www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/03/05/16:53:04

From: sos AT buggy DOT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: strchr fix
5 Mar 1998 16:53:04 -0800 :
Message-ID: <01BD47AD.7E81EC00.cygnus.cygwin32.developers@sos>
To: "'cygwin32-developers AT cygnus DOT com'" <cygwin32-developers AT cygnus DOT com>

newlib/libc/string/strchr.c	(strchr): do unsigned char comparisons.

RCS file: /usr/cvsroot/cdk/newlib/libc/string/strchr.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 strchr.c
--- strchr.c    1998/02/28 18:54:42     1.1.1.1
+++ strchr.c    1998/03/04 17:36:20
@@ -58,10 +58,11 @@ QUICKREF
 #define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK))

 char *
-_DEFUN (strchr, (s, i),
-       _CONST char *s _AND
+_DEFUN (strchr, (s1, i),
+       _CONST char *s1 _AND
        int i)
 {
+  unsigned char *s = s1;
 #ifdef PREFER_SIZE_OVER_SPEED
   unsigned char c = (unsigned int)i;

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019