aboutsummaryrefslogtreecommitdiffstats
path: root/sharkd_session.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal@wireshark.org>2020-05-14 15:28:39 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2020-05-14 19:56:39 +0000
commit536f5b466bfe5b88cafaa1b04f3052a155376afb (patch)
treeefd1cee68284ff48697fa66c2892e31ff642b734 /sharkd_session.c
parent4b67b72d2a5724f650cf59f912faa96f999e2eca (diff)
sharkd_session.c: fix a warning reported by gcc 10
warning: ā€˜%sā€™ directive argument is null [-Wformat-overflow=] 544 | fprintf(stderr, "load: filename=%s\n", tok_file); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I583a94308ad53b461606053def17e8537eec8d65 Reviewed-on: https://code.wireshark.org/review/37195 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'sharkd_session.c')
-rw-r--r--sharkd_session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sharkd_session.c b/sharkd_session.c
index ffb7bcdc45..0a81b69c2e 100644
--- a/sharkd_session.c
+++ b/sharkd_session.c
@@ -541,11 +541,11 @@ sharkd_session_process_load(const char *buf, const jsmntok_t *tokens, int count)
const char *tok_file = json_find_attr(buf, tokens, count, "file");
int err = 0;
- fprintf(stderr, "load: filename=%s\n", tok_file);
-
if (!tok_file)
return;
+ fprintf(stderr, "load: filename=%s\n", tok_file);
+
if (sharkd_cf_open(tok_file, WTAP_TYPE_AUTO, FALSE, &err) != CF_OK)
{
sharkd_json_simple_reply(err, NULL);