chiark / gitweb /
don't compare a non-existing function with NULL
authorDaniel Mierswa <impulze@impulze.org>
Mon, 17 Aug 2009 21:13:19 +0000 (23:13 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 18 Aug 2009 00:00:39 +0000 (02:00 +0200)
Obviously someone forgot something here or didn't use -ansi. Either way,
index is nowhere declared so I assume the current behaviour is to check
against the index() function coming from somewhere in the POSIX headers.
The comparison doesn't make sense then.

Signed-off-by: Daniel Mierswa <impulze@impulze.org>
libudev/libudev-queue-private.c

index 0427b65a015a06b499541c43424974abf12d0b7d..4dea4ad0e7f4ae8f43e4c0afa3b96dfb06c95ba6 100644 (file)
@@ -158,7 +158,7 @@ static struct queue_devpaths *build_index(struct udev_queue_export *udev_queue_e
                return NULL;
        }
        devpaths = calloc(1, sizeof(struct queue_devpaths) + (range + 1) * sizeof(long));
-       if (index == NULL)
+       if (devpaths == NULL)
                return NULL;
        devpaths->devpaths_size = range + 1;