summaryrefslogtreecommitdiff
path: root/libudev/libudev-queue-private.c
diff options
context:
space:
mode:
authorDaniel Mierswa <impulze@impulze.org>2009-08-17 23:13:19 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-08-18 02:00:39 +0200
commit8eefdffb6bb458403c4fa5c9435290189d8d2a60 (patch)
tree1ec49841ee4e6bf3ed8a02727dbc70252bfd7709 /libudev/libudev-queue-private.c
parenta90221b61639e582e4a85d2a508784ca29a2401b (diff)
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 <impulze@impulze.org>
Diffstat (limited to 'libudev/libudev-queue-private.c')
-rw-r--r--libudev/libudev-queue-private.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c
index 0427b65a01..4dea4ad0e7 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;