From bed4ada5c10f2fcdb2e90fd5168a2462d0136f1a Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 4 Nov 2010 13:49:07 +0200 Subject: [PATCH] Remove nicely misleading #ifndef NOTYET case from skipInstallFiles() - No point "documenting" with reverse ifdef's what somebody was considering to implement eight years ago, as it is directory and file iterations can't be mixed as they both mess with fi->j. - Also eliminate pointless "can't happen" check - this never gets called with NULL fi in an element (which is already a cant happen) --- lib/transaction.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/transaction.c b/lib/transaction.c index c7e6849..85b99fa 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -794,14 +794,7 @@ static void skipInstallFiles(const rpmts ts, rpmte p) } /* Skip (now empty) directories that had skipped files. */ -#ifndef NOTYET - if (fi != NULL) /* XXX can't happen */ - for (j = 0; j < dc; j++) -#else - if ((fi = rpmfiInitD(fi)) != NULL) - while (j = rpmfiNextD(fi) >= 0) -#endif - { + for (j = 0; j < dc; j++) { if (drc[j]) continue; /* dir still has files. */ if (!dff[j]) continue; /* dir was not emptied here. */ -- 2.7.4