ia64/xen-unstable

changeset 16489:74bd94747ca3

[Mini-OS] Fix strrchr() when string doesn't contain the character.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Nov 28 12:41:41 2007 +0000 (2007-11-28)
parents 8d406e2813c8
children 3fdbdd131fc7
files extras/mini-os/lib/string.c
line diff
     1.1 --- a/extras/mini-os/lib/string.c	Wed Nov 28 12:40:57 2007 +0000
     1.2 +++ b/extras/mini-os/lib/string.c	Wed Nov 28 12:41:41 2007 +0000
     1.3 @@ -142,7 +142,7 @@ char * strchr(const char * s, int c)
     1.4  
     1.5  char * strrchr(const char * s, int c)
     1.6  {
     1.7 -        const char *res;
     1.8 +        const char *res = NULL;
     1.9          for(; *s != '\0'; ++s)
    1.10                  if (*s == (char) c)
    1.11                          res = s;