From 87463855960340c3096ad88a5fef4493361c305e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 1 Apr 1999 09:21:09 -0800 Subject: [PATCH] bugfix Rev: src/pike_memory.c:1.36 Rev: src/port.c:1.19 --- src/pike_memory.c | 4 +--- src/port.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pike_memory.c b/src/pike_memory.c index 5c9f531aa1..f5bb736d80 100644 --- a/src/pike_memory.c +++ b/src/pike_memory.c @@ -10,7 +10,7 @@ #include "pike_macros.h" #include "gc.h" -RCSID("$Id: pike_memory.c,v 1.35 1999/03/19 11:39:30 hubbe Exp $"); +RCSID("$Id: pike_memory.c,v 1.36 1999/04/01 17:21:07 hubbe Exp $"); /* strdup() is used by several modules, so let's provide it */ #ifndef HAVE_STRDUP @@ -37,14 +37,12 @@ int pcharp_memcmp(PCHARP a, PCHARP b, int sz) INLINE p_wchar1 *MEMCHR1(p_wchar1 *p,p_wchar1 c,INT32 e) { - e++; while(--e >= 0) if(*(p++)==c) return p-1; return (p_wchar1 *)0; } INLINE p_wchar2 *MEMCHR2(p_wchar2 *p,p_wchar2 c,INT32 e) { - e++; while(--e >= 0) if(*(p++)==c) return p-1; return (p_wchar2 *)0; } diff --git a/src/port.c b/src/port.c index 586413ed90..e38ebd11d8 100644 --- a/src/port.c +++ b/src/port.c @@ -17,7 +17,7 @@ #include <float.h> #include <string.h> -RCSID("$Id: port.c,v 1.18 1998/11/22 11:03:12 hubbe Exp $"); +RCSID("$Id: port.c,v 1.19 1999/04/01 17:21:09 hubbe Exp $"); #ifdef sun time_t time PROT((time_t *)); @@ -237,7 +237,6 @@ int MEMCMP(const void *bb,const void *aa,int s) #ifndef HAVE_MEMCHR char *MEMCHR(char *p,char c,int e) { - e++; while(--e >= 0) if(*(p++)==c) return p-1; return (char *)0; } -- GitLab