aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-06-22 20:05:21 +0000
committerDavid Shaw <[email protected]>2005-06-22 20:05:21 +0000
commit825d12638b24b2a2e94c91123c131a97ddf51205 (patch)
tree90f681f98e49ea823c920515fd2a768909c8f6fc
parent* libcurl.m4: Only do the OS X linker fix on Panther. Tiger has a (diff)
downloadgnupg-825d12638b24b2a2e94c91123c131a97ddf51205.tar.gz
gnupg-825d12638b24b2a2e94c91123c131a97ddf51205.zip
* memrchr.c (memrchr): Not all compilers allow initializing based on a
variable that is also being initialized. Noted by Nelson H. F. Beebe.
Diffstat (limited to '')
-rw-r--r--util/ChangeLog6
-rw-r--r--util/memrchr.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index a8baa5c37..6b6f6edf5 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-22 David Shaw <[email protected]>
+
+ * memrchr.c (memrchr): Not all compilers allow initializing based
+ on a variable that is also being initialized. Noted by Nelson
+ H. F. Beebe.
+
2005-06-21 David Shaw <[email protected]>
* http.c (send_request, http_open, http_open_document): Pass in
diff --git a/util/memrchr.c b/util/memrchr.c
index fafce1073..5621f7323 100644
--- a/util/memrchr.c
+++ b/util/memrchr.c
@@ -33,7 +33,9 @@
void *
memrchr(const void *s, int c, size_t n)
{
- const unsigned char *start=s,*end=s+n-1;
+ const unsigned char *start=s,*end=s;
+
+ end+=n-1;
while(end>=start)
{