libcacard/vreader: Tighten assertion to clarify intent
authorMarkus Armbruster <armbru@redhat.com>
Fri, 23 May 2014 11:24:36 +0000 (13:24 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 23 May 2014 20:46:11 +0000 (00:46 +0400)
Bonus: hushes up Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
libcacard/vreader.c

index 93b01c8601e192d4d3273d64759a947d06ee5597..f1288d9986c7cadc588fa4dbb8b1529a8f33be78 100644 (file)
@@ -283,7 +283,7 @@ vreader_xfr_bytes(VReader *reader,
                   response->b_sw2, response->b_len, response->b_total_len);
         }
     }
-    assert(card_status == VCARD_DONE);
+    assert(card_status == VCARD_DONE && response);
     int size = MIN(*receive_buf_len, response->b_total_len);
     memcpy(receive_buf, response->b_data, size);
     *receive_buf_len = size;