nuttx/libc: Fix some spacing and alignment issues

This commit is contained in:
Gregory Nutt
2015-10-12 07:45:02 -06:00
parent c70987e551
commit e9bd8bceb4
48 changed files with 293 additions and 249 deletions
+8 -8
View File
@@ -62,13 +62,13 @@ FAR char *strstr(FAR const char *str, FAR const char *substr)
* the string
*/
return (char*)str;
return (FAR char *)str;
}
/* Search for the substring */
candidate = str;
for (;;)
for (; ; )
{
/* strchr() will return a pointer to the next occurrence of the
* character ch in the string
@@ -77,19 +77,19 @@ FAR char *strstr(FAR const char *str, FAR const char *substr)
candidate = strchr(candidate, ch);
if (!candidate || strlen(candidate) < len)
{
/* First character of the substring does not appear in the string
* or the remainder of the string is not long enough to contain the
* substring.
*/
/* First character of the substring does not appear in the string
* or the remainder of the string is not long enough to contain the
* substring.
*/
return NULL;
return NULL;
}
/* Check if this is the beginning of a matching substring */
if (strncmp(candidate, substr, len) == 0)
{
return (char*)candidate;
return (FAR char *)candidate;
}
/* No, find the next candidate after this one */