mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-02 02:15:58 -04:00
fix the warns that actually matter
This commit is contained in:
@@ -59,9 +59,10 @@ void ServerConsole::run()
|
||||
char inBuf[1024] = {"\0"};
|
||||
while(! feof(stdin))
|
||||
{
|
||||
fread(inBuf, 1024, 1, stdin);
|
||||
input += inBuf;
|
||||
memset(inBuf, 0, sizeof(inBuf));
|
||||
if (fread(inBuf, 1024, 1, stdin)) {
|
||||
input += inBuf;
|
||||
memset(inBuf, 0, sizeof(inBuf));
|
||||
}
|
||||
}
|
||||
|
||||
if(input.length() > 0)
|
||||
|
||||
@@ -119,10 +119,11 @@ void Os::installCommon(void)
|
||||
char buffer[512];
|
||||
while (!feof(f))
|
||||
{
|
||||
fgets(buffer, 512, f);
|
||||
if (strncmp(buffer, "processor\t: ", 12)==0)
|
||||
{
|
||||
processorCount = atoi(buffer+12)+1;
|
||||
if (fgets(buffer, 512, f) != NULL) {
|
||||
if (strncmp(buffer, "processor\t: ", 12)==0)
|
||||
{
|
||||
processorCount = atoi(buffer+12)+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
|
||||
Reference in New Issue
Block a user