aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunchih Chen <yunchih.cat@gmail.com>2018-12-07 22:26:09 +0800
committerYunchih Chen <yunchih.cat@gmail.com>2019-03-07 15:02:17 +0800
commit6297f69da8f443c0e8cce03e97437945170a9cc4 (patch)
tree41e9521ab1646c1b167ecef121d3b39b70a0b27e
parent47bda70fb4cba47720e8aaca80e28985b7c7d99d (diff)
downloadnfcollect-6297f69da8f443c0e8cce03e97437945170a9cc4.tar
nfcollect-6297f69da8f443c0e8cce03e97437945170a9cc4.tar.gz
nfcollect-6297f69da8f443c0e8cce03e97437945170a9cc4.tar.bz2
nfcollect-6297f69da8f443c0e8cce03e97437945170a9cc4.tar.lz
nfcollect-6297f69da8f443c0e8cce03e97437945170a9cc4.tar.xz
nfcollect-6297f69da8f443c0e8cce03e97437945170a9cc4.tar.zst
nfcollect-6297f69da8f443c0e8cce03e97437945170a9cc4.zip
Minor formatting and copyright
-rw-r--r--bin/nfcollect.c2
-rw-r--r--include/main.h2
-rw-r--r--lib/collect.c5
-rw-r--r--lib/extract.c3
-rw-r--r--lib/sql.c2
5 files changed, 8 insertions, 6 deletions
diff --git a/bin/nfcollect.c b/bin/nfcollect.c
index 16a4248..a36d177 100644
--- a/bin/nfcollect.c
+++ b/bin/nfcollect.c
@@ -1,7 +1,7 @@
// The MIT License (MIT)
-// Copyright (c) 2017 Yun-Chih Chen
+// Copyright (c) 2018 Yun-Chih Chen
// Copyright (c) 2013 Florian Richter (nflogtable)
// Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/include/main.h b/include/main.h
index 8d5b628..c2407e1 100644
--- a/include/main.h
+++ b/include/main.h
@@ -1,6 +1,6 @@
// The MIT License (MIT)
-// Copyright (c) 2017 Yun-Chih Chen
+// Copyright (c) 2018 Yun-Chih Chen
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/lib/collect.c b/lib/collect.c
index 21ad415..5ea673a 100644
--- a/lib/collect.c
+++ b/lib/collect.c
@@ -1,7 +1,7 @@
// The MIT License (MIT)
-// Copyright (c) 2017 Yun-Chih Chen
+// Copyright (c) 2018 Yun-Chih Chen
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -39,7 +39,8 @@
Global g;
-static int handle_packet(__attribute__((unused)) struct nflog_g_handle *gh, __attribute__((unused)) struct nfgenmsg *nfmsg,
+static int handle_packet(__attribute__((unused)) struct nflog_g_handle *gh,
+ __attribute__((unused)) struct nfgenmsg *nfmsg,
struct nflog_data *nfa, void *_s) {
#define HASH_ENTRY(e) (e->sport ^ e->timestamp)
register const struct iphdr *iph;
diff --git a/lib/extract.c b/lib/extract.c
index 5687ad2..50d9d6b 100644
--- a/lib/extract.c
+++ b/lib/extract.c
@@ -44,7 +44,8 @@ static bool extract_zstd(State *s, const void *src) {
static bool extract_lz4(State *s, const void *src) {
// TODO
- (void)s; (void)src;
+ (void)s;
+ (void)src;
return true;
}
diff --git a/lib/sql.c b/lib/sql.c
index d383790..99f97ef 100644
--- a/lib/sql.c
+++ b/lib/sql.c
@@ -44,7 +44,7 @@ static inline int db_prepare(sqlite3 *db, const char *cmd, const char *errmsg,
int db_set_pragma(sqlite3 *db) {
return db_exec_fatal(db,
"PRAGMA journal_mode=WAL;"
- "PRAGMA foreign_keys = ON;",
+ "PRAGMA foreign_keys=ON;",
"Can't set Sqlite3 PRAGMA");
}