diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-07-13 16:46:51 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-07-13 16:48:05 +0200 |
commit | 9b9072c77d415000b110627c0f5aaa7f9d642d19 (patch) | |
tree | 7690389eec7e932595f02fd33a121c12d429ae18 /netsniff-ng.c | |
parent | 3fb9ca90bffa92e5c5399440994170c4b8cb96f1 (diff) |
sparse: netsniff-ng, trafgen: fix remaining time(0) warnings
Those are the last occurences of warnings like:
netsniff-ng.c:697:48: warning: Using plain integer as NULL pointer
netsniff-ng.c:726:48: warning: Using plain integer as NULL pointer
...
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r-- | netsniff-ng.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c index 644a351..7b08ed0 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -694,7 +694,7 @@ static int next_multi_pcap_file(struct ctx *ctx, int fd) close(fd); slprintf(fname, sizeof(fname), "%s/%s%lu.pcap", ctx->device_out, - ctx->prefix ? : "dump-", time(0)); + ctx->prefix ? : "dump-", time(NULL)); fd = open_or_die_m(fname, O_RDWR | O_CREAT | O_TRUNC | O_LARGEFILE, DEFFILEMODE); @@ -723,7 +723,7 @@ static int begin_multi_pcap_file(struct ctx *ctx) ctx->device_out[strlen(ctx->device_out) - 1] = 0; slprintf(fname, sizeof(fname), "%s/%s%lu.pcap", ctx->device_out, - ctx->prefix ? : "dump-", time(0)); + ctx->prefix ? : "dump-", time(NULL)); fd = open_or_die_m(fname, O_RDWR | O_CREAT | O_TRUNC | O_LARGEFILE, DEFFILEMODE); |