diff options
author | Jouni Malinen <j@w1.fi> | 2020-03-22 16:15:43 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2020-03-22 16:50:04 (GMT) |
commit | 913220cbb881ea405b158ae2116fd769bc4f8f3e (patch) | |
tree | 87be2461866a6d60fb0155dc5f032f390c22c607 /src/utils/eloop_win.c | |
parent | ae7193611f69042436a9f4aaec56c0ff8f7a827a (diff) | |
download | hostap-913220cbb881ea405b158ae2116fd769bc4f8f3e.zip hostap-913220cbb881ea405b158ae2116fd769bc4f8f3e.tar.gz hostap-913220cbb881ea405b158ae2116fd769bc4f8f3e.tar.bz2 |
eloop: Use size_t for signal_count
This is more consistent with the other eloop registrations and avoids a
theoretical integer overflow with 16-bit int (not that there would ever
be more that 32767 signal handlers getting registered).
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/utils/eloop_win.c')
-rw-r--r-- | src/utils/eloop_win.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/eloop_win.c b/src/utils/eloop_win.c index 9c8b12b..74eaa33 100644 --- a/src/utils/eloop_win.c +++ b/src/utils/eloop_win.c @@ -54,7 +54,7 @@ struct eloop_data { struct dl_list timeout; - int signal_count; + size_t signal_count; struct eloop_signal *signals; int signaled; int pending_terminate; @@ -422,7 +422,7 @@ int eloop_replenish_timeout(unsigned int req_secs, unsigned int req_usecs, #if 0 static void eloop_handle_signal(int sig) { - int i; + size_t i; eloop.signaled++; for (i = 0; i < eloop.signal_count; i++) { @@ -437,7 +437,7 @@ static void eloop_handle_signal(int sig) static void eloop_process_pending_signals(void) { - int i; + size_t i; if (eloop.signaled == 0) return; @@ -517,7 +517,7 @@ int eloop_register_signal_terminate(eloop_signal_handler handler, eloop.term_signal.handler = handler; eloop.term_signal.user_data = user_data; - + return 0; } |