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@xxxxxxxxxxx> --- libudev/libudev-queue-private.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c index 0427b65..c8e0150 100644 --- a/libudev/libudev-queue-private.c +++ b/libudev/libudev-queue-private.c @@ -158,8 +158,6 @@ 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) - return NULL; devpaths->devpaths_size = range + 1; /* read all records and populate the table */