mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 18:33:16 +00:00
Auto-format with clang-format
This commit is contained in:
parent
8d485b9bfd
commit
272e84eaa8
4 changed files with 10 additions and 6 deletions
|
@ -1054,7 +1054,8 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo
|
||||||
break;
|
break;
|
||||||
|
|
||||||
buff = buffer;
|
buff = buffer;
|
||||||
for (i = 0; i < (int)strlen(buff) - 1 && (buff[i] == ' ' || buff[i] == '\t'); i++);
|
for (i = 0; i < (int)strlen(buff) - 1 && (buff[i] == ' ' || buff[i] == '\t'); i++)
|
||||||
|
;
|
||||||
buff += i;
|
buff += i;
|
||||||
line++;
|
line++;
|
||||||
if (strlen(buff) <= 2 || buff[0] == '#')
|
if (strlen(buff) <= 2 || buff[0] == '#')
|
||||||
|
@ -1075,9 +1076,11 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo
|
||||||
}
|
}
|
||||||
name = buff;
|
name = buff;
|
||||||
*pt++ = 0;
|
*pt++ = 0;
|
||||||
for (i = 0; i < (int)strlen(pt) - 1 && (pt[i] == ' ' || pt[i] == '\t'); i++);
|
for (i = 0; i < (int)strlen(pt) - 1 && (pt[i] == ' ' || pt[i] == '\t'); i++)
|
||||||
|
;
|
||||||
pt += i;
|
pt += i;
|
||||||
for (i = strlen(pt); i >= 1 && (pt[i - 1] == ' ' || pt[i - 1] == '\t' || pt[i - 1] == '\n'); i--);
|
for (i = strlen(pt); i >= 1 && (pt[i - 1] == ' ' || pt[i - 1] == '\t' || pt[i - 1] == '\n'); i--)
|
||||||
|
;
|
||||||
if (!i) {
|
if (!i) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
fprintf(stderr, "ERROR: Missing argument for option at %s:%d\n", cfgfile, line);
|
fprintf(stderr, "ERROR: Missing argument for option at %s:%d\n", cfgfile, line);
|
||||||
|
|
|
@ -394,7 +394,8 @@ struct cl_cvd *cl_cvdhead(const char *file)
|
||||||
if ((pt = strpbrk(head, "\n\r")))
|
if ((pt = strpbrk(head, "\n\r")))
|
||||||
*pt = 0;
|
*pt = 0;
|
||||||
|
|
||||||
for (i = bread - 1; i > 0 && (head[i] == ' ' || head[i] == '\n' || head[i] == '\r'); head[i] = 0, i--);
|
for (i = bread - 1; i > 0 && (head[i] == ' ' || head[i] == '\n' || head[i] == '\r'); head[i] = 0, i--)
|
||||||
|
;
|
||||||
|
|
||||||
return cl_cvdparse(head);
|
return cl_cvdparse(head);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue