summaryrefslogtreecommitdiff
path: root/nuttx/lib/lib_strtokr.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/lib/lib_strtokr.c')
-rw-r--r--nuttx/lib/lib_strtokr.c32
1 files changed, 16 insertions, 16 deletions
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.