Fixed undefined behavior when left shifting signed integer.

This commit is contained in:
Ruslan Ermilov 2016-08-04 23:42:00 +03:00
parent 2d02048d43
commit e3c4fddbea

View file

@ -884,7 +884,7 @@ ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker)
"sigprocmask() failed");
}
srandom((ngx_pid << 16) ^ ngx_time());
srandom(((unsigned) ngx_pid << 16) ^ ngx_time());
/*
* disable deleting previous events for the listening sockets because