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.
Этот коммит содержится в:
родитель
43f24eb152
Коммит
e5732992b1
@ -191,7 +191,10 @@ _libssh2_send(libssh2_socket_t sock, const void *buffer, size_t length,
|
||||
unsigned int
|
||||
_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]));
|
||||
}
|
||||
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user