apply astyle

This commit is contained in:
XhmikosR 2012-12-11 11:43:38 +02:00 committed by PKEuS
parent 53506973a4
commit 9f11c01450
2 changed files with 5 additions and 3 deletions

View File

@ -74,7 +74,7 @@ int main()
int len = std::min(1 + atoi(lenstr), (int)(sizeof(data) - 2)); int len = std::min(1 + atoi(lenstr), (int)(sizeof(data) - 2));
fgets(data, len, stdin); fgets(data, len, stdin);
} else { } else {
const char *s = getenv("QUERY_STRING"); const char *s = getenv("QUERY_STRING");
strncpy(data, s?s:"", sizeof(data)-2); strncpy(data, s?s:"", sizeof(data)-2);
} }

View File

@ -2,13 +2,15 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
char *replace(char *str, char before, char after) { char *replace(char *str, char before, char after)
{
while (strchr(str,before)) while (strchr(str,before))
*strchr(str,before) = after; *strchr(str,before) = after;
return str; return str;
} }
int main() { int main()
{
FILE *f = fopen("times.log", "rt"); FILE *f = fopen("times.log", "rt");
if (!f) if (!f)
return 1; return 1;