[xen-unstable] [Mini-OS] Fix strrchr() when string doesn't contain the character.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen-unstable] [Mini-OS] Fix strrchr() when string doesn't contain the character.

Xen patchbot-unstable
# HG changeset patch
# User Keir Fraser <[hidden email]>
# Date 1196253701 0
# Node ID 74bd94747ca31fae0616f8ecc36b389867fb13ed
# Parent  8d406e2813c8b32790d63a727a9185e97f3eaf75
[Mini-OS] Fix strrchr() when string doesn't contain the character.
Signed-off-by: Samuel Thibault <[hidden email]>
---
 extras/mini-os/lib/string.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 8d406e2813c8 -r 74bd94747ca3 extras/mini-os/lib/string.c
--- a/extras/mini-os/lib/string.c Wed Nov 28 12:40:57 2007 +0000
+++ b/extras/mini-os/lib/string.c Wed Nov 28 12:41:41 2007 +0000
@@ -142,7 +142,7 @@ char * strchr(const char * s, int c)
 
 char * strrchr(const char * s, int c)
 {
-        const char *res;
+        const char *res = NULL;
         for(; *s != '\0'; ++s)
                 if (*s == (char) c)
                         res = s;

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog