X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=session.c;h=152f9790b818bcffc94a1e81b1796852abbe8ce4;hp=4a3878a57507c1c81c6202f99e39907172b17fb5;hb=a0cfa7355b04d9451e6a92028199d35b2bad8c9c;hpb=49e9f06791d585fb112e9602946e9740f4cb3a74 diff --git a/session.c b/session.c index 4a3878a..152f979 100644 --- a/session.c +++ b/session.c @@ -577,6 +577,12 @@ void run_session(void) } } + /* This is unlikely to happen but it makes static analyzers stop complaining. */ + if (!devices) { + g_critical("No real devices found."); + return; + } + sdi = devices->data; g_slist_free(devices); g_slist_free(real_devices); @@ -669,7 +675,7 @@ void run_session(void) if (opt_frames) { if ((sr_parse_sizestring(opt_frames, &limit_frames) != SR_OK)) { - g_critical("Invalid sample limit '%s'.", opt_samples); + g_critical("Invalid frame limit '%s'.", opt_frames); sr_session_destroy(session); return; }