mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
misc.c: _libssh2_ntohu32 cast bit shifting (#401)
To quite overly aggressive analyzers. Note, the builds pass, Travis is having some issues with Docker images.
This commit is contained in:
@@ -191,7 +191,10 @@ _libssh2_send(libssh2_socket_t sock, const void *buffer, size_t length,
|
|||||||
unsigned int
|
unsigned int
|
||||||
_libssh2_ntohu32(const unsigned char *buf)
|
_libssh2_ntohu32(const unsigned char *buf)
|
||||||
{
|
{
|
||||||
return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
|
return (((unsigned int)buf[0] << 24)
|
||||||
|
| ((unsigned int)buf[1] << 16)
|
||||||
|
| ((unsigned int)buf[2] << 8)
|
||||||
|
| ((unsigned int)buf[3]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user