Skip to content

Commit

Permalink
use NULL instead of 0 for null pointers
Browse files Browse the repository at this point in the history
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
  • Loading branch information
dicej committed Nov 14, 2023
1 parent 3e11e7b commit b4b59f2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libc-top-half/musl/src/misc/dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
* library resolution cannot or should not be supported (and the application can
* handle this situation gracefully). */

#include <stddef.h>
#include <dlfcn.h>

static const char *error = 0;
static const char *error = NULL;

weak int dlclose(void *library)
{
Expand All @@ -27,18 +28,18 @@ weak int dlclose(void *library)
weak char *dlerror(void)
{
const char *var = error;
error = 0;
error = NULL;
return (char*) var;
}

weak void *dlopen(const char *name, int flags)
{
error = "dlopen not implemented";
return 0;
return NULL;
}

weak void *dlsym(void *library, const char *name)
{
error = "dlsym not implemented";
return 0;
return NULL;
}

0 comments on commit b4b59f2

Please sign in to comment.