]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
* choose.cc (getpkgbyname): Use consistent method for scanning package array.
authorChristopher Faylor <me@cgf.cx>
Fri, 15 Jun 2001 00:33:33 +0000 (00:33 +0000)
committerChristopher Faylor <me@cgf.cx>
Fri, 15 Jun 2001 00:33:33 +0000 (00:33 +0000)
ChangeLog
choose.cc

index 6224be3ff1408e8c74e613c7a7d5a5103cd95f20..6f125d6e73a6af9e4ea2865d46b157437bcc89d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 14 20:33:01 2001  Robert Collins <rbtcollins@hotmail.com>
+
+       * choose.cc (getpkgbyname): Use consistent method for scanning package
+       array.
+
 Wed Jun 13 23:33:08 2001  Christopher Faylor <cgf@cygnus.com>
 
        * choose.cc:  Add some comments.
index aaaeb344e1f6871c5fefe442b97e08cd26b1a014..d9fbeaa87028b1a57b760c3760642b559a2fdd15 100644 (file)
--- a/choose.cc
+++ b/choose.cc
@@ -777,9 +777,9 @@ parse_filename (const char *in_fn, fileparse& f)
 Package *
 getpkgbyname (const char *pkgname)
 {
-  for (int i = 0; i < npackages; i++)
-    if (strcasecmp (package[i].name, pkgname) == 0)
-      return package + i;
+  for (Package *pkg = package; pkg->name; pkg++)
+    if (strcasecmp (pkg->name, pkgname) == 0)
+      return pkg;
 
   return NULL;
 }
This page took 0.033169 seconds and 5 git commands to generate.