• L
    unifdef: use memcpy instead of strncpy · 38c7b224
    Linus Torvalds 提交于
    New versions of gcc reasonably warn about the odd pattern of
    
    	strncpy(p, q, strlen(q));
    
    which really doesn't make sense: the strncpy() ends up being just a slow
    and odd way to write memcpy() in this case.
    
    There was a comment about _why_ the code used strncpy - to avoid the
    terminating NUL byte, but memcpy does the same and avoids the warning.
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    38c7b224
unifdef.c 34.8 KB