Skip to content

Commit

Permalink
Fix warning due to comparison of signed and unsigned values
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Apr 15, 2022
1 parent 0d4f58a commit c40331a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osdp_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ int osdp_phy_check_packet(struct osdp_pd *pd, uint8_t *buf, int len,
}

if (pkt_len > OSDP_PACKET_BUF_SIZE ||
pkt_len < sizeof(struct osdp_packet_header)) {
(unsigned long)pkt_len < sizeof(struct osdp_packet_header)) {
pd->reply_id = REPLY_NAK;
pd->ephemeral_data[0] = OSDP_PD_NAK_CMD_LEN;
return OSDP_ERR_PKT_NACK;
Expand Down

0 comments on commit c40331a

Please sign in to comment.