Skip to content

Commit 0a2b8e7

Browse files
onlyspxctremetux
authored andcommitted
test: REQUEST_FIXED_SIZE expression is always true comparing unsigned int to SIZE_MAX
`SIZE_MAX` is out of the range of `client->req_len` (unsigned int). Compare `client->req_len` to `UINT_MAX` instead. This fixes one of the Clang warnings as mentioned in #23. Signed-off-by: Spxctre <[email protected]>
1 parent 5d2d010 commit 0a2b8e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ dix_request_fixed_size_overflow(ClientRec *client)
169169
xReq req = { 0 };
170170

171171
client->req_len = req.length = 1;
172-
REQUEST_FIXED_SIZE(req, SIZE_MAX);
172+
REQUEST_FIXED_SIZE(req, UINT_MAX);
173173
return Success;
174174
}
175175

0 commit comments

Comments
 (0)