]> git.zerfleddert.de Git - usb-driver/commitdiff
better check for NULL on access
authorMichael Gernoth <michael@gernoth.net>
Sat, 19 May 2007 13:15:27 +0000 (15:15 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sat, 19 May 2007 13:15:27 +0000 (15:15 +0200)
usb-driver.c

index 18d6331189750b06a127344f446b04b90601c6ad..be3b94ffaded07ff9285328551126c1ea58c98f9 100644 (file)
@@ -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);
Impressum, Datenschutz