aboutgitcodebugslistschat
path: root/pcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcap.c')
-rw-r--r--pcap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pcap.c b/pcap.c
index 2c390f2..7b5a1af 100644
--- a/pcap.c
+++ b/pcap.c
@@ -172,9 +172,7 @@ fail:
*/
void pcap_init(struct ctx *c, int index)
{
- char name[] = PCAP_PREFIX PCAP_ISO8601_STR STR(UINT_MAX) ".pcap";
struct timeval tv;
- struct tm *tm;
if (pcap_fd != -1)
return;
@@ -183,6 +181,10 @@ void pcap_init(struct ctx *c, int index)
return;
if (*c->pcap == 1) {
+ char name[] = PCAP_PREFIX PCAP_ISO8601_STR STR(UINT_MAX)
+ ".pcap";
+ struct tm *tm;
+
if (c->mode == MODE_PASTA)
memcpy(name, PCAP_PREFIX_PASTA,
sizeof(PCAP_PREFIX_PASTA));