* [PATCH] [Mini-OS] Fix strrchr()
@ 2007-11-27 10:54 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2007-11-27 10:54 UTC (permalink / raw)
To: xen-devel
Fix strrchr() when string doesn't contain the character.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
diff -r 26e766e0c628 extras/mini-os/lib/string.c
--- a/extras/mini-os/lib/string.c Mon Nov 26 22:28:48 2007 +0000
+++ b/extras/mini-os/lib/string.c Tue Nov 27 10:44:34 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-27 10:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-27 10:54 [PATCH] [Mini-OS] Fix strrchr() Samuel Thibault
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.