summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_random.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_random.c')
-rw-r--r--src/nxt_random.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nxt_random.c b/src/nxt_random.c
index 1211896c..8290488c 100644
--- a/src/nxt_random.c
+++ b/src/nxt_random.c
@@ -148,10 +148,10 @@ nxt_random(nxt_random_t *r)
nxt_random_stir(r);
}
- val = nxt_random_byte(r) << 24;
- val |= nxt_random_byte(r) << 16;
- val |= nxt_random_byte(r) << 8;
- val |= nxt_random_byte(r);
+ val = (uint32_t) nxt_random_byte(r) << 24;
+ val |= (uint32_t) nxt_random_byte(r) << 16;
+ val |= (uint32_t) nxt_random_byte(r) << 8;
+ val |= (uint32_t) nxt_random_byte(r);
return val;
}