Re: Bug in MEMCMP(3)

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

Hello Sebastian,

On Wed, Mar 2, 2011 at 1:36 AM, Sebastian Unger <sebunger@xxxxxxx> wrote:
> Hi there,
> I just used the above man page and noticed that it did not say whether
> “bytes” are compared signed or unsigned. This may not be specified, but in
> this case I would expect the man-page to at least say so.
> I’m using current ubuntu 10.10
> Man-pages version 3.24-1ubuntu1

Thanks. For man-pages-3.33, I applied the patch below.



--- a/man3/memcmp.3
+++ b/man3/memcmp.3
@@ -37,8 +37,9 @@ memcmp \- compare memory areas
 .BR memcmp ()
-function compares the first \fIn\fP bytes of the
-memory areas \fIs1\fP and \fIs2\fP.
+function compares the first \fIn\fP bytes (each interpreted as
+.IR "unsigned char" )
+of the memory areas \fIs1\fP and \fIs2\fP.
 It returns an integer less than,
 equal to, or greater than zero if \fIs1\fP is found, respectively, to
 be less than, to match, or be greater than \fIs2\fP.

Michael Kerrisk
Linux man-pages maintainer;
Author of "The Linux Programming Interface";
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Memory]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]     [Linux Resources]

Add to Google Powered by Linux