summaryrefslogtreecommitdiff
path: root/nuttx/lib
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-16 18:39:46 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-16 18:39:46 +0000
commit07656e5f84288c96e871a522bb48e050ceec8551 (patch)
tree9ee3ba0a23a3c660076204af8b2a7fbf399c5ff2 /nuttx/lib
parent4764ba54f9306b0e39ccf5e3a0dd2f40604ea848 (diff)
downloadpx4-nuttx-07656e5f84288c96e871a522bb48e050ceec8551.tar.gz
px4-nuttx-07656e5f84288c96e871a522bb48e050ceec8551.tar.bz2
px4-nuttx-07656e5f84288c96e871a522bb48e050ceec8551.zip
NSH redirected output
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@823 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
-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.