Gentoo Archives: gentoo-commits

From: "Ned Ludd (solar)" <solar@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-projects commit in portage-utils: qlist.c
Date: Mon, 16 Mar 2009 01:42:39
Message-Id: E1Lj1qe-0000Aa-SY@stork.gentoo.org
solar       09/03/16 01:42:36

  Modified:             qlist.c
  Log:
  always reset the umap buffer

Revision  Changes    Path
1.51                 portage-utils/qlist.c

file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qlist.c?r1=1.50&r2=1.51

Index: qlist.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- qlist.c	4 Nov 2008 07:23:22 -0000	1.50
+++ qlist.c	16 Mar 2009 01:42:36 -0000	1.51
@@ -1,7 +1,7 @@
 /*
  * Copyright 2005-2007 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v 1.50 2008/11/04 07:23:22 pva Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qlist.c,v 1.51 2009/03/16 01:42:36 solar Exp $
  *
  * Copyright 2005-2007 Ned Ludd        - <solar@g.o>
  * Copyright 2005-2007 Mike Frysinger  - <vapier@g.o>
@@ -39,7 +39,7 @@
 	/* "query filename for pkgname", */
 	COMMON_OPTS_HELP
 };
-static const char qlist_rcsid[] = "$Id: qlist.c,v 1.50 2008/11/04 07:23:22 pva Exp $";
+static const char qlist_rcsid[] = "$Id: qlist.c,v 1.51 2009/03/16 01:42:36 solar Exp $";
 #define qlist_usage(ret) usage(ret, QLIST_FLAGS, qlist_long_opts, qlist_opts_help, lookup_applet_idx("qlist"))
 
 extern char *grab_vdb_item(const char *, const char *, const char *);
@@ -78,11 +78,11 @@
 	if ((use = grab_vdb_item("USE", CAT, PV)) == NULL)
 		return NULL;
 
+	memset(umap, 0, sizeof(umap)); /* reset the buffer */
+
 	/* grab_vdb is a static function so save it to memory right away */
 	makeargv(use, &use_argc, &use_argv);
 	if ((iuse = grab_vdb_item("IUSE", CAT, PV)) != NULL) {
-
-		memset(umap, 0, sizeof(umap));
 		makeargv(iuse, &iuse_argc, &iuse_argv);
 		for (u = 1; u < use_argc; u++) {
 			for (i = 1; i < iuse_argc; i++) {