commit a988f9fd2d69cf5725404f456d9499bdd5a131dc
parent 072aa1ed4be9c4f4977755a2016704d65dd234df
Author: Frederic Cambus <fred@statdns.com>
Date: Mon, 9 Jan 2017 09:42:01 +0100
Use OpenBSD style(9) for function prototypes and declarations
Diffstat:
5 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/compat/pledge.h b/compat/pledge.h
@@ -1 +1 @@
-int pledge(const char *promises, const char *paths[]);
+int pledge(const char *, const char **paths);
diff --git a/compat/strtonum.h b/compat/strtonum.h
@@ -1,2 +1 @@
-long long strtonum(const char *nptr, long long minval, long long maxval,
- const char **errstr);
+long long strtonum(const char *, long long, long long, const char **);
diff --git a/src/logswan.c b/src/logswan.c
@@ -76,7 +76,8 @@ int8_t getoptFlag;
struct HLL uniqueIPv4, uniqueIPv6;
char *intputFile;
-void displayUsage() {
+void
+displayUsage() {
printf("USAGE : logswan [options] inputfile\n\n" \
"Options are :\n\n" \
" -g Enable GeoIP lookups\n" \
@@ -84,7 +85,8 @@ void displayUsage() {
" -v Display version\n\n");
}
-int main (int argc, char *argv[]) {
+int
+main(int argc, char *argv[]) {
if (pledge("stdio rpath", NULL) == -1) {
err(EXIT_FAILURE, "pledge");
}
diff --git a/src/output.c b/src/output.c
@@ -18,7 +18,8 @@
#include "config.h"
#include "output.h"
-char *output(struct results* results) {
+char
+*output(struct results* results) {
json_t *output = json_object();
json_t *hits = json_object();
json_t *visits = json_object();
diff --git a/src/parse.c b/src/parse.c
@@ -18,7 +18,8 @@
#include "parse.h"
-void parseDate(struct date* parsedDate, char *date) {
+void
+parseDate(struct date* parsedDate, char *date) {
char *last;
parsedDate->day = strtok_r(date, "/", &last);
@@ -29,7 +30,8 @@ void parseDate(struct date* parsedDate, char *date) {
parsedDate->second = strtok_r(NULL, " ", &last);
}
-void parseLine(struct logLine* parsedLine, char *lineBuffer) {
+void
+parseLine(struct logLine* parsedLine, char *lineBuffer) {
char *last;
if (*lineBuffer) {
@@ -57,7 +59,8 @@ void parseLine(struct logLine* parsedLine, char *lineBuffer) {
}
}
-void parseRequest(struct request* parsedRequest, char *request) {
+void
+parseRequest(struct request* parsedRequest, char *request) {
char *last;
char *pch = strrchr(request, ' ');