code-style: whitespace fixes
This commit is contained in:
parent
51009a9600
commit
53be158979
|
@ -87,12 +87,12 @@ cp(const char *s1, const char *s2, int depth)
|
|||
continue;
|
||||
|
||||
estrlcpy(ns1, s1, sizeof(ns1));
|
||||
if(s1[strlen(s1) - 1] != '/')
|
||||
if (s1[strlen(s1) - 1] != '/')
|
||||
estrlcat(ns1, "/", sizeof(ns1));
|
||||
estrlcat(ns1, d->d_name, sizeof(ns1));
|
||||
|
||||
estrlcpy(ns2, s2, sizeof(ns2));
|
||||
if(s2[strlen(s2) - 1] != '/')
|
||||
if (s2[strlen(s2) - 1] != '/')
|
||||
estrlcat(ns2, "/", sizeof(ns2));
|
||||
estrlcat(ns2, d->d_name, sizeof(ns2));
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#include <regex.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "../util.h"
|
||||
|
||||
|
@ -10,11 +11,12 @@ enregcomp(int status, regex_t *preg, const char *regex, int cflags)
|
|||
char errbuf[BUFSIZ] = "";
|
||||
int r;
|
||||
|
||||
if((r = regcomp(preg, regex, cflags)) == 0)
|
||||
if ((r = regcomp(preg, regex, cflags)) == 0)
|
||||
return r;
|
||||
|
||||
regerror(r, preg, errbuf, sizeof(errbuf));
|
||||
enprintf(status, "invalid regex: %s\n", errbuf);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,10 @@ char *
|
|||
strcasestr(const char *h, const char *n)
|
||||
{
|
||||
size_t l = strlen(n);
|
||||
for (; *h; h++) if (!strncasecmp(h, n, l)) return (char *)h;
|
||||
|
||||
for (; *h; h++)
|
||||
if (!strncasecmp(h, n, l))
|
||||
return (char *)h;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user