Commit a5d40cef authored by Philippe Teuwen's avatar Philippe Teuwen

Fix warning about garbage value

acr122s.c:196:23: warning: The left operand of '<<' is a garbage value
  size_t frame_size = FRAME_SIZE(frame);
                      ^          ~~~~~~
acr122s.c:76:24: note: expanded from macro 'FRAME_SIZE'
                       ^
acr122s.c:74:47: note: expanded from macro 'APDU_SIZE'
parent 5cda3af5
......@@ -386,7 +386,9 @@ acr122s_get_firmware_version(nfc_device *pnd, char *version, size_t length)
int ret;
uint8_t cmd[MAX_FRAME_SIZE];
acr122s_build_frame(pnd, cmd, sizeof(cmd), 0x48, 0, NULL, 0, 0);
if (! acr122s_build_frame(pnd, cmd, sizeof(cmd), 0x48, 0, NULL, 0, 0)) {
return NFC_EINVARG;
}
if ((ret = acr122s_send_frame(pnd, cmd, 1000)) != 0)
return ret;
......@@ -639,7 +641,10 @@ acr122s_send(nfc_device *pnd, const uint8_t *buf, const size_t buf_len, int time
uart_flush_input(DRIVER_DATA(pnd)->port);
uint8_t cmd[MAX_FRAME_SIZE];
acr122s_build_frame(pnd, cmd, sizeof(cmd), 0, 0, buf, buf_len, 1);
if (! acr122s_build_frame(pnd, cmd, sizeof(cmd), 0, 0, buf, buf_len, 1)) {
return NFC_EINVARG;
}
int ret;
if ((ret = acr122s_send_frame(pnd, cmd, timeout)) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to transmit data. (TX)");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment