Mercurial > hg > octave-kai > gnulib-hg
comparison lib/strstr.c @ 6064:199c20f568d7
Fix return value.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 19 Aug 2005 11:00:51 +0000 |
parents | a878a8d58823 |
children | 83bee8e13391 |
comparison
equal
deleted
inserted
replaced
6063:12f61def36ee | 6064:199c20f568d7 |
---|---|
69 | 69 |
70 for (;; mbui_advance (rhaystack), mbui_advance (rneedle)) | 70 for (;; mbui_advance (rhaystack), mbui_advance (rneedle)) |
71 { | 71 { |
72 if (!mbui_avail (rneedle)) | 72 if (!mbui_avail (rneedle)) |
73 /* Found a match. */ | 73 /* Found a match. */ |
74 return (char *) haystack; | 74 return (char *) mbui_cur_ptr (iter_haystack); |
75 if (!mbui_avail (rhaystack)) | 75 if (!mbui_avail (rhaystack)) |
76 /* No match. */ | 76 /* No match. */ |
77 return NULL; | 77 return NULL; |
78 if (!mb_equal (mbui_cur (rhaystack), mbui_cur (rneedle))) | 78 if (!mb_equal (mbui_cur (rhaystack), mbui_cur (rneedle))) |
79 /* Nothing in this round. */ | 79 /* Nothing in this round. */ |