1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-09-01 14:21:56 +03:00

Cast the process id

GetProcessId returns a DWORD (which is unsigned) and the HighPart or a
LARGE_INTEGER is a LONG (which is signed). As we are just doing some
hashing it is fine to cast this.
This commit is contained in:
Matt Clarkson
2015-05-22 14:00:55 +01:00
parent d81258ce88
commit 798e808e2b

View File

@@ -1136,7 +1136,7 @@ static void suggest_passwd(char *passwd)
/* valid characters are 32 to 126 */
GetSystemTimeAsFileTime(&num.ft);
num.li.HighPart |= GetCurrentProcessId();
num.li.HighPart |= (LONG)GetCurrentProcessId();
p = passwd;
while (num.li.QuadPart) {
u = (unsigned)(num.li.QuadPart % 95);