Mercurial > hg > octave-lyh > gnulib-hg
changeset 9662:52902e86c444
Prefer "sizeof v" over the equivalent "4".
* lib/md4.c (set_uint32): Use "sizeof v" as memcpy length, not 4.
* lib/md5.c (set_uint32): Likewise.
* lib/sha1.c (set_uint32): Likewise.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Thu, 31 Jan 2008 13:04:07 +0100 |
parents | 7af2e7ef9554 |
children | 701f448527a4 |
files | ChangeLog lib/md4.c lib/md5.c lib/sha1.c |
diffstat | 4 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-01-31 Jim Meyering <meyering@redhat.com> + + Prefer "sizeof v" over the equivalent "4". + * lib/md4.c (set_uint32): Use "sizeof v" as memcpy length, not 4. + * lib/md5.c (set_uint32): Likewise. + * lib/sha1.c (set_uint32): Likewise. + 2008-01-31 Simon Josefsson <simon@josefsson.org> * lib/sha1.c (set_uint32): Mark function as static.
--- a/lib/md4.c +++ b/lib/md4.c @@ -70,7 +70,7 @@ static void set_uint32 (char *cp, uint32_t v) { - memcpy (cp, &v, 4); + memcpy (cp, &v, sizeof v); } /* Put result from CTX in first 16 bytes following RESBUF. The result