X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxmemdup0.c;h=c070fa634354598861bf661fa2e43972288405a1;hb=929bd53a6d2863c97bd3eb371f4693c39540bcb5;hp=68dd49053c504458b2922d039b9f7fcecb41d40f;hpb=1602f0afed21be664fcf5c42d59db07cc22c56d6;p=gnulib.git diff --git a/lib/xmemdup0.c b/lib/xmemdup0.c index 68dd49053..c070fa634 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-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2013 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