mirror of https://gerrit.osmocom.org/libosmocore
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
This commit is contained in:
parent
4a1cb09a40
commit
9533631e53
|
@ -334,7 +334,7 @@ static int dump_file(struct osim_chan_hdl *chan, uint16_t fid)
|
||||||
case EF_TYPE_RECORD_FIXED:
|
case EF_TYPE_RECORD_FIXED:
|
||||||
for (i = 0; i < ffdd.num_rec; i++) {
|
for (i = 0; i < ffdd.num_rec; i++) {
|
||||||
rmsg = read_record_nr(chan, i+1, ffdd.rec_len);
|
rmsg = read_record_nr(chan, i+1, ffdd.rec_len);
|
||||||
if (!msg)
|
if (!rmsg)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
printf("SW: %s\n", osim_print_sw(chan->card, msgb_apdu_sw(msg)));
|
printf("SW: %s\n", osim_print_sw(chan->card, msgb_apdu_sw(msg)));
|
||||||
printf("Rec %03u: %s\n", i+1,
|
printf("Rec %03u: %s\n", i+1,
|
||||||
|
|
Loading…
Reference in New Issue