Man Page strncpy: Misleading word.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael,
http://man7.org/linux/man-pages/man3/strncpy.3.html
I see:
    The strncpy() function is similar, except that at most n **bytes**
of src are copied
I expected:
    The strncpy() function is similar, except that at most n
**characters** of src are copied

The difference is important because
if the `char` size (in bytes) is different from 1 byte on some
implementation then "the number of characters" and "the number of
bytes" are different.

The confirmation to my words is in C99:
7.21.2.4 The strncpy function
The strncpy function copies not more than n **characters** ...

Robin Kuzmin
kuzmin.robin@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux