mesh: use explicit uint32_t when bit shifting left
authorInga Stotland <inga.stotland@intel.com>
Wed, 30 Mar 2022 21:17:47 +0000 (14:17 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit6565fdb13840a4ad8570bc9292bcf321f50a4c0f
tree2d9989c5bd2284bbd389877ac09cf8eddcefd238
parenta1039eeece3b0a81e0cf732a885b1c5bef60341f
mesh: use explicit uint32_t when bit shifting left

This addresses a situation when a boolean type is represented by
an integer and performing a left shift on a boolean causes
an integer overflow.

This fixes the following runtime error:
"left shift of 1 by 31 places cannot be represented in type 'int'"

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
mesh/crypto.c
mesh/net.c
mesh/net.h