From 8eefdffb6bb458403c4fa5c9435290189d8d2a60 Mon Sep 17 00:00:00 2001 From: Daniel Mierswa Date: Mon, 17 Aug 2009 23:13:19 +0200 Subject: [PATCH] don't compare a non-existing function with NULL 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 --- libudev/libudev-queue-private.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c index 0427b65a0..4dea4ad0e 100644 --- a/libudev/libudev-queue-private.c +++ b/libudev/libudev-queue-private.c @@ -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; -- 2.30.2