The following commit has been merged in the master branch:
commit 86c90d927b55ca203dc8f666d45d0f941f5f9c90
Author: Guillem Jover <[email protected]>
Date:   Mon Feb 8 14:47:00 2010 +0100

    dselect: Do not shadow global thisname variable

diff --git a/dselect/basecmds.cc b/dselect/basecmds.cc
index 136546f..b4d4d60 100644
--- a/dselect/basecmds.cc
+++ b/dselect/basecmds.cc
@@ -99,15 +99,16 @@ int baselist::checksearch(char* str) {
 
 int baselist::matchsearch(int index) {
   int lendiff, searchlen, i;
-  const char* thisname;
+  const char *name;
 
-  thisname=itemname(index);
-  if (!thisname) return 0;     /* Skip things without a name (seperators) */
+  name = itemname(index);
+  if (!name)
+    return 0;  /* Skip things without a name (seperators). */
 
   searchlen=strlen(searchstring);
-  lendiff= strlen(thisname) - searchlen;
+  lendiff = strlen(name) - searchlen;
   for (i=0; i<=lendiff; i++)
-    if (!strncasecmp(thisname + i, searchstring, searchlen))
+    if (!strncasecmp(name + i, searchstring, searchlen))
       return 1;
 
   return 0;
diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc
index 4c03c69..a6f006d 100644
--- a/dselect/pkglist.cc
+++ b/dselect/pkglist.cc
@@ -527,12 +527,13 @@ int packagelist::checksearch(char* rx) {
 }
 
 int packagelist::matchsearch(int index) {
-  const char* thisname;
+  const char *name;
 
-  thisname=itemname(index);
-  if (!thisname) return 0;     /* Skip things without a name (seperators) */
+  name = itemname(index);
+  if (!name)
+    return 0;  /* Skip things without a name (seperators) */
 
-  if (regexec(&searchfsm, thisname, 0, NULL, 0)==0)
+  if (regexec(&searchfsm, name, 0, NULL, 0) == 0)
     return 1;
 
   if (searchdescr) {

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to