From 07656e5f84288c96e871a522bb48e050ceec8551 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 16 Aug 2008 18:39:46 +0000 Subject: NSH redirected output git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@823 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/lib/lib_strtokr.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'nuttx/lib/lib_strtokr.c') diff --git a/nuttx/lib/lib_strtokr.c b/nuttx/lib/lib_strtokr.c index aacacce07..8a12c5f72 100644 --- a/nuttx/lib/lib_strtokr.c +++ b/nuttx/lib/lib_strtokr.c @@ -120,32 +120,32 @@ char *strtok_r(char *str, const char *delim, char **saveptr) *pbegin && strchr(delim, *pbegin) != NULL; pbegin++); - /* If we are at the end of the string with nothing - * but delimiters found, then return NULL. - */ + /* If we are at the end of the string with nothing + * but delimiters found, then return NULL. + */ - if (!*pbegin) - { - return NULL; - } + if (!*pbegin) + { + return NULL; + } - /* Find the end of the token */ + /* Find the end of the token */ for (pend = pbegin + 1; *pend && strchr(delim, *pend) == NULL; pend++); - /* pend either points to the end of the string or to - * the first delimiter after the string. - */ + /* pend either points to the end of the string or to + * the first delimiter after the string. + */ - if (*pend) - { - /* Turn the delimiter into a null terminator */ + if (*pend) + { + /* Turn the delimiter into a null terminator */ - *pend++ = '\0'; - } + *pend++ = '\0'; + } /* Save the pointer where we left off and return the * beginning of the token. -- cgit v1.2.3