Disagreement about memcpy
Me and some other co-students we have a disagreement on checking the result of memcpy.
Based on these references
some of us believe that one can't check if memcpy failed unless if after use it, compare using memcmp the destination with source.
Some other co-students believe that one can check if memcpy fail by comparing the return value with NULL.
if(memcmp(dest,source,Size) != 0)
*Supose that dest/source/Size are valid
if(memcpy(dest,source,Size) == NULL)
Finally i also think that there is no point on check memcpy as far as i pass valid arguments.
Precaution is better than treatment !!!
We need an opinion here :)