From b4b59f287fd6c36824e211e4454d5e7664fedef8 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 14 Nov 2023 11:35:26 -0700 Subject: [PATCH] use `NULL` instead of `0` for null pointers Signed-off-by: Joel Dice --- libc-top-half/musl/src/misc/dl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libc-top-half/musl/src/misc/dl.c b/libc-top-half/musl/src/misc/dl.c index c80485ab2..266594fd1 100644 --- a/libc-top-half/musl/src/misc/dl.c +++ b/libc-top-half/musl/src/misc/dl.c @@ -14,9 +14,10 @@ * library resolution cannot or should not be supported (and the application can * handle this situation gracefully). */ +#include #include -static const char *error = 0; +static const char *error = NULL; weak int dlclose(void *library) { @@ -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; }