Fixes for PVS Studio warnings: warnings in unix/main.c and sv_send.c

This commit is contained in:
Daniel Gibson 2019-08-24 20:40:06 -01:00
parent f9c77b98af
commit d615190e36
2 changed files with 7 additions and 2 deletions

View file

@ -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
{

View file

@ -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;
}