Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: nih/string.c

Issue 524041: Changes to make upstart log performance stats to a file. (Closed)
Patch Set: More tab/space stuff Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « make_pkg.sh ('k') | nih/tests/test_string.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nih/string.c
diff --git a/nih/string.c b/nih/string.c
index ff38fdd33778e9001c666d0ca0e316a8b0651057..b7d59e3665b23d377f5b7679ec7cac21381a96bf 100644
--- a/nih/string.c
+++ b/nih/string.c
@@ -405,9 +405,12 @@ nih_str_split (const void *parent,
const char *ptr;
/* Skip initial delimiters */
- while (repeat && strchr (delim, *str))
+ while (repeat && *str && strchr (delim, *str))
str++;
+ if (! *str)
+ break;
+
/* Find the end of the token */
ptr = str;
while (*str && (! strchr (delim, *str)))
« no previous file with comments | « make_pkg.sh ('k') | nih/tests/test_string.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698