From b8b756f5d39ddfb395832493e69924e015a28588 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 19 May 2007 15:15:27 +0200 Subject: [PATCH] better check for NULL on access --- usb-driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/usb-driver.c b/usb-driver.c index 18d6331..be3b94f 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -891,10 +891,7 @@ int access(const char *pathname, int mode) { if (!func) func = (int (*) (const char*, int)) dlsym(RTLD_NEXT, "access"); - if (!pathname) - return -1; - - if (!strcmp(pathname, "/dev/windrvr6")) { + if (pathname && !strcmp(pathname, "/dev/windrvr6")) { return 0; } else { return (*func)(pathname, mode);