lkml.org 
[lkml]   [2022]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH linux-next] x86/mce/dev-mcelog: use strscpy() to instead of strncpy()
Date
>> The implementation of strscpy() is more robust and safer.
>> That's now the recommended way to copy NUL terminated strings.
>
> It should read "NULL-terminated strings".

Both "NUL-terminated" and "NULL-terminated" seem to be used in the kernel
source and commit comments. NULL is ahead 124:45 in the source, but it
is closer in the commit logs where the ratio is 129:76.

Single "L" NUL seems technically more accurate as the string terminator is
an ascii NUL character. From man 5 ascii the character name is NUL (though
the description says "null" to muddy the waters)

Oct Dec Hex Char
───────────────────────────────────────────
000 0 00 NUL '\0' (null character)

-Tony

\
 
 \ /
  Last update: 2022-12-14 22:30    [W:0.084 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site