[vlc-commits] strtok_r: remove tabs
Jean-Baptiste Kempf
git at videolan.org
Wed Oct 5 10:56:01 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Oct 5 10:55:32 2011 +0200| [42419926ec6da22e863c0dfc06937369bdd2942f] | committer: Jean-Baptiste Kempf
strtok_r: remove tabs
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42419926ec6da22e863c0dfc06937369bdd2942f
---
compat/strtok_r.c | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/compat/strtok_r.c b/compat/strtok_r.c
index 7a17d67..8785309 100644
--- a/compat/strtok_r.c
+++ b/compat/strtok_r.c
@@ -26,27 +26,27 @@
char *strtok_r(char *s, const char *delim, char **save_ptr)
{
- char *token;
+ char *token;
- if (s == NULL)
- s = *save_ptr;
+ if (s == NULL)
+ s = *save_ptr;
- /* Scan leading delimiters. */
- s += strspn (s, delim);
- if (*s == '\0')
- return NULL;
+ /* Scan leading delimiters. */
+ s += strspn (s, delim);
+ if (*s == '\0')
+ return NULL;
- /* Find the end of the token. */
- token = s;
- s = strpbrk (token, delim);
- if (s == NULL)
- /* This token finishes the string. */
- *save_ptr = strchr (token, '\0');
- else
- {
- /* Terminate the token and make *SAVE_PTR point past it. */
- *s = '\0';
- *save_ptr = s + 1;
- }
- return token;
+ /* Find the end of the token. */
+ token = s;
+ s = strpbrk (token, delim);
+ if (s == NULL)
+ /* This token finishes the string. */
+ *save_ptr = strchr (token, '\0');
+ else
+ {
+ /* Terminate the token and make *SAVE_PTR point past it. */
+ *s = '\0';
+ *save_ptr = s + 1;
+ }
+ return token;
}
More information about the vlc-commits
mailing list