mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-04-11 12:40:45 +00:00
Fixes for PVS Studio warnings: warnings in unix/main.c and sv_send.c
This commit is contained in:
parent
f9c77b98af
commit
d615190e36
2 changed files with 7 additions and 2 deletions
|
@ -25,6 +25,7 @@
|
|||
* =======================================================================
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -69,7 +70,11 @@ main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
realpath(argv[i + 1], datadir);
|
||||
if(realpath(argv[i + 1], datadir) == NULL)
|
||||
{
|
||||
printf("realpath(datadir) failed: %s\n", strerror(errno));
|
||||
datadir[0] = '\0';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -227,7 +227,7 @@ SV_Multicast(vec3_t origin, multicast_t to)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (mask && (!(mask[cluster >> 3] & (1 << (cluster & 7)))))
|
||||
if (!(mask[cluster >> 3] & (1 << (cluster & 7))))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue