linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Mierswa <impulze@impulze.org>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] Don't compare a non-existing function with NULL
Date: Mon, 17 Aug 2009 14:19:51 +0000	[thread overview]
Message-ID: <4A896707.6010507@impulze.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]


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 |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)



[-- Attachment #2: 0001-Don-t-compare-a-non-existing-function-with-NULL.patch --]
[-- Type: text/x-patch, Size: 517 bytes --]

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 */


             reply	other threads:[~2009-08-17 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 14:19 Daniel Mierswa [this message]
2009-08-17 21:06 ` [PATCH] Don't compare a non-existing function with NULL Alan Jenkins
2009-08-17 21:13 ` Daniel Mierswa
2009-08-18  0:01 ` Kay Sievers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A896707.6010507@impulze.org \
    --to=impulze@impulze.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).