X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxmemdup0.c;h=8a805635e0067216ee5054f5c84e4b7329750425;hb=86627bb14a123f183bd094e582e4cd9f2aca489a;hp=22d9d45415013a745829cdfb60f4d8a518c8961c;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/lib/xmemdup0.c b/lib/xmemdup0.c index 22d9d4541..8a805635e 100644 --- a/lib/xmemdup0.c +++ b/lib/xmemdup0.c @@ -1,6 +1,6 @@ /* xmemdup0.c -- copy a block of arbitrary bytes, plus a trailing NUL - Copyright (C) 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,10 +23,10 @@ #include /* Clone an arbitrary block of bytes P of size S, with error checking, - and include a terminating NUL byte. P is of type `void const *', + and include a terminating NUL byte. P is of type 'void const *', to make it easier to use this with other mem* functions that return - `void *', but since appending a NUL byte only makes sense on bytes, - the return type is `char *'. + 'void *', but since appending a NUL byte only makes sense on bytes, + the return type is 'char *'. The terminating NUL makes it safe to use strlen or rawmemchr to check for embedded NUL; it also speeds up algorithms such as escape