mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-25 19:09:52 +03:00
src/Cedar/Admin.c: remove redundant check
found by Coverity *** CID 341551: Incorrect expression (NO_EFFECT) /src/Cedar/Admin.c: 414 in AdminWebHandleFileRequest() 408 // Handle the file request 409 bool AdminWebHandleFileRequest(ADMIN *a, CONNECTION *c, SOCK *s, HTTP_HEADER *h, char *url_src, char *query_string, char *virtual_root_dir, char *physical_root_dir) 410 { 411 bool ret = false; 412 char url[MAX_PATH]; 413 UINT i, len; >>> CID 341551: Incorrect expression (NO_EFFECT) >>> Comparing an array to null is not useful: "url == NULL", since the test will always evaluate as true. 414 if (a == NULL || c == NULL || s == NULL || h == NULL || url == NULL || query_string == NULL || 415 virtual_root_dir == NULL || physical_root_dir == NULL) 416 { 417 return false; 418 } 419
This commit is contained in:
parent
17a04b4387
commit
47ad2328c0
@ -411,7 +411,7 @@ bool AdminWebHandleFileRequest(ADMIN *a, CONNECTION *c, SOCK *s, HTTP_HEADER *h,
|
||||
bool ret = false;
|
||||
char url[MAX_PATH];
|
||||
UINT i, len;
|
||||
if (a == NULL || c == NULL || s == NULL || h == NULL || url == NULL || query_string == NULL ||
|
||||
if (a == NULL || c == NULL || s == NULL || h == NULL || query_string == NULL ||
|
||||
virtual_root_dir == NULL || physical_root_dir == NULL)
|
||||
{
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user