Skip to content

Commit 3a990e7

Browse files
authored
explicitly cast uint to int to avoid error (#1307)
Second half of PR to perform cast and compare of casted value. Previous commit performed the cast, but was still comparing against the non-cast value :-( Signed-off-by: Glen Gibb <[email protected]>
1 parent 512caf0 commit 3a990e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BMI/bmi_interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ int bmi_interface_recv_with_copy(bmi_interface_t *bmi, char *data, int max_len)
175175

176176
assert(pkt_header->len < INT_MAX);
177177
int pkt_header_len = (int)pkt_header->len;
178-
rv = (max_len < pkt_header->len) ? max_len : pkt_header->len;
178+
rv = (max_len < pkt_header_len) ? max_len : pkt_header_len;
179179

180180
memcpy(data, pkt_data, rv);
181181

0 commit comments

Comments
 (0)