Skip to content

Commit

Permalink
Change function address comparison to be done with nullptr instead of 0
Browse files Browse the repository at this point in the history
This fixes the following Coverity issue:
`src/acl_support.cpp:403:34:
  Type: Function address comparison (BAD_COMPARE)`
  • Loading branch information
IlanTruanovsky committed Jan 10, 2023
1 parent d188f5c commit dbbc3e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/acl_support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ char *acl_dlerror(void) {
}
}

int acl_dlpresent(void) { return LoadLibrary != 0; }
int acl_dlpresent(void) { return &LoadLibrary != nullptr; }

int acl_dlclose(void *handle) { return (int)FreeLibrary((HMODULE)handle); }

Expand All @@ -400,7 +400,7 @@ void *acl_dlsym(void *dllhandle, const char *symbolname) {

char *acl_dlerror(void) { return dlerror(); }

int acl_dlpresent(void) { return dlopen != 0; }
int acl_dlpresent(void) { return &dlopen != nullptr; }

int acl_dlclose(void *dllhandle) { return !dlclose(dllhandle); }

Expand Down

0 comments on commit dbbc3e8

Please sign in to comment.