The following commit has been merged in the master branch:
commit 01b03062de7945b1345115f4d31e51a4d18ccfa0
Author: Guillem Jover <[email protected]>
Date:   Thu Feb 24 08:49:01 2011 +0100

    Rename namevalue variables to nv and nv_head

diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c
index ad1d26c..0d4c437 100644
--- a/lib/dpkg/fields.c
+++ b/lib/dpkg/fields.c
@@ -35,25 +35,25 @@
 
 static int
 parse_nv_next(struct parsedb_state *ps, const struct pkginfo *pigp,
-              const char *what, const struct namevalue *ivip,
+              const char *what, const struct namevalue *nv_head,
               const char **strp)
 {
   const char *startp = *strp, *ep;
-  const struct namevalue *nvip;
+  const struct namevalue *nv;
 
   if (!*startp)
     parse_error(ps, pigp, _("%s is missing"), what);
 
-  nvip = namevalue_find_by_name(ivip, startp);
-  if (nvip == NULL)
+  nv = namevalue_find_by_name(nv_head, startp);
+  if (nv == NULL)
     parse_error(ps, pigp, _("'%.50s' is not allowed for %s"), startp, what);
 
-  ep = startp + nvip->length;
+  ep = startp + nv->length;
   while (isspace(*ep))
     ep++;
   *strp = ep;
 
-  return nvip->value;
+  return nv->value;
 }
 
 static int
diff --git a/src/select.c b/src/select.c
index 8be05f4..f8a2468 100644
--- a/src/select.c
+++ b/src/select.c
@@ -81,7 +81,7 @@ void getselections(const char *const *argv) {
 }
 
 void setselections(const char *const *argv) {
-  const struct namevalue *nvp;
+  const struct namevalue *nv;
   struct pkginfo *pkg;
   const char *e;
   int c, lno;
@@ -132,11 +132,11 @@ void setselections(const char *const *argv) {
     e = pkg_name_is_illegal(namevb.buf, NULL);
     if (e) ohshit(_("illegal package name at line %d: %.250s"),lno,e);
 
-    nvp = namevalue_find_by_name(wantinfos, selvb.buf);
-    if (nvp == NULL)
+    nv = namevalue_find_by_name(wantinfos, selvb.buf);
+    if (nv == NULL)
       ohshit(_("unknown wanted status at line %d: %.250s"), lno, selvb.buf);
     pkg = pkg_db_find(namevb.buf);
-    pkg->want= nvp->value;
+    pkg->want = nv->value;
     if (c == EOF) break;
     lno++;
   }

-- 
dpkg's main repository


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

Reply via email to