style fixes. No code changes
This commit is contained in:
parent
50f7f446ec
commit
51742f4bb0
30 changed files with 84 additions and 82 deletions
|
@ -8,12 +8,8 @@
|
|||
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "libbb.h"
|
||||
|
||||
|
||||
void trim(char *s)
|
||||
{
|
||||
size_t len = strlen(s);
|
||||
|
@ -23,9 +19,9 @@ void trim(char *s)
|
|||
while (len && isspace(s[len-1])) --len;
|
||||
|
||||
/* trim leading whitespace */
|
||||
if(len) {
|
||||
if (len) {
|
||||
lws = strspn(s, " \n\r\t\v");
|
||||
memmove(s, s + lws, len -= lws);
|
||||
}
|
||||
s[len] = 0;
|
||||
s[len] = '\0';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue