X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxmemdup0.c;h=8e36813ab8884b473d72cd03cf3b6504f78b7475;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=22d9d45415013a745829cdfb60f4d8a518c8961c;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/lib/xmemdup0.c b/lib/xmemdup0.c index 22d9d4541..8e36813ab 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-2014 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