osmo-sim-test.c: Fix rmsg check

we wanted to check for !rmsg, but used to check for !msg, missing error
returns from read_record_nr().

Change-Id: I79b6a94b1aa947c8329317b0626865c3cd4159c1
Fixes: Coverity CID 57672
changes/99/1299/2
Harald Welte 6 years ago
parent 4a1cb09a40
commit 9533631e53
  1. 2
      utils/osmo-sim-test.c

@ -334,7 +334,7 @@ static int dump_file(struct osim_chan_hdl *chan, uint16_t fid)
case EF_TYPE_RECORD_FIXED:
for (i = 0; i < ffdd.num_rec; i++) {
rmsg = read_record_nr(chan, i+1, ffdd.rec_len);
if (!msg)
if (!rmsg)
return -EIO;
printf("SW: %s\n", osim_print_sw(chan->card, msgb_apdu_sw(msg)));
printf("Rec %03u: %s\n", i+1,

Loading…
Cancel
Save