mirror of
https://github.com/nmap/nmap.git
synced 2026-10-22 20:01:32 +00:00
Cast literal to appropriate type
On 64-bit, the literal 1 is a 32-bit integer, and can't be shifted by the appropriate amount (61 bits).
This commit is contained in:
parent
39cdd05864
commit
a5ce7f6083
1 changed files with 1 additions and 1 deletions
|
|
@ -395,7 +395,7 @@ nsock_event_id get_new_event_id(mspool *ms, enum nse_type type) {
|
|||
assert(type < NSE_TYPE_MAX);
|
||||
|
||||
shiftbits = sizeof(nsock_event_id) * 8 - TYPE_CODE_NUM_BITS;
|
||||
max_serial_allowed = (1 << shiftbits) - 1;
|
||||
max_serial_allowed = ((unsigned long)1 << shiftbits) - 1;
|
||||
if (serial == max_serial_allowed) {
|
||||
/* then the next serial will be one because 0 is forbidden */
|
||||
ms->next_event_serial = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue