(memrchr): Fixed implementation. Problem pointed out
by Adriaan de Groot.
This commit is contained in:
parent
3d6d811a83
commit
6e468be50e
@ -1,3 +1,7 @@
|
||||
2004-02-11 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* autogen.sh (check_version): Removed bashism and simplified.
|
||||
|
||||
2004-02-10 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* configure.ac: Fixed funopen test change.
|
||||
|
3
THANKS
3
THANKS
@ -1,4 +1,5 @@
|
||||
|
||||
Adriaan de Groot adridg@cs.kun.nl
|
||||
Alfons Hoogervorst alfons@proteus.demon.nl
|
||||
Enno Cramer uebergeek@web.de
|
||||
Frank Heckenbach frank@g-n-u.de
|
||||
@ -12,7 +13,7 @@ Timo Schulz twoaday@freakmail.de
|
||||
Tommy Reynolds reynolds@redhat.com
|
||||
|
||||
|
||||
Copyright 2001, 2002 g10 Code GmbH
|
||||
Copyright 2001, 2002, 2004 g10 Code GmbH
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
|
@ -18,7 +18,7 @@ cvtver () {
|
||||
}
|
||||
|
||||
check_version () {
|
||||
if [ $(( `("$1" --version || echo "0") | cvtver` >= $2 )) == 1 ]; then
|
||||
if [ `("$1" --version || echo "0") | cvtver` -ge "$2" ]; then
|
||||
return 0
|
||||
fi
|
||||
echo "**Error**: "\`$1\'" not installed or too old." >&2
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-02-15 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* memrchr.c (memrchr): Fixed implementation. Problem pointed out
|
||||
by Adriaan de Groot.
|
||||
|
||||
2004-02-01 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* rungpg.c (build_argv): Use --no-comment, not --comment "".
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* memrchr.c - Replacement for memrchr.
|
||||
* Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
@ -27,10 +27,13 @@
|
||||
void *
|
||||
memrchr (const void *block, int c, size_t size)
|
||||
{
|
||||
void *p;
|
||||
const unsigned char *p = block;
|
||||
|
||||
for (p = block + size; p != block; p --)
|
||||
if (*p == c)
|
||||
return p;
|
||||
return 0;
|
||||
if (size)
|
||||
{
|
||||
for (p += size - 1; size; p--, size--)
|
||||
if (*p == c)
|
||||
return (void *)p;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user