Linux Hotplug development
 help / color / mirror / Atom feed
* [PATCH] hwdb: drop useless line freeing
@ 2012-01-02 21:00 Mike Frysinger
  2012-01-02 21:49 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2012-01-02 21:00 UTC (permalink / raw)
  To: linux-hotplug

getline() takes care of extending the buffer as needed, so no point in
constantly freeing it before every call.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 udev/udev-builtin-hwdb.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/udev/udev-builtin-hwdb.c b/udev/udev-builtin-hwdb.c
index e38c6b9..b6af4b6 100644
--- a/udev/udev-builtin-hwdb.c
+++ b/udev/udev-builtin-hwdb.c
@@ -101,11 +101,6 @@ static int lookup_vid_pid(const char *database,
 	for (;;) {
 		size_t n;
 
-		if (line) {
-			free(line);
-			line = NULL;
-		}
-
 		if (getline(&line, &n, f) < 0)
 			break;
 
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-02 21:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-02 21:00 [PATCH] hwdb: drop useless line freeing Mike Frysinger
2012-01-02 21:49 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox