Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Reduce block depth
Baptiste Daroussin committed 9 years ago
commit 3bdf74dff9089a404f8822a67f236450b7f7a3c0
parent a7e18f1
1 file changed +11 -11
modified libpkg/pkg_jobs_universe.c
@@ -703,12 +703,12 @@ pkg_jobs_update_universe_item_priority(struct pkg_jobs_universe *universe,

		while (deps_func(it->pkg, &d) == EPKG_OK) {
			HASH_FIND_STR(universe->items, d->uid, found);
-
			if (found != NULL) {
-
				LL_FOREACH(found, cur) {
-
					if (cur->priority < priority + 1)
-
						pkg_jobs_update_universe_item_priority(universe, cur,
-
								priority + 1, type);
-
				}
+
			if (found == NULL)
+
				continue;
+
			LL_FOREACH(found, cur) {
+
				if (cur->priority < priority + 1)
+
					pkg_jobs_update_universe_item_priority(universe, cur,
+
					    priority + 1, type);
			}
		}

@@ -716,11 +716,11 @@ pkg_jobs_update_universe_item_priority(struct pkg_jobs_universe *universe,
		maxpri = priority;
		while (rdeps_func(it->pkg, &d) == EPKG_OK) {
			HASH_FIND_STR(universe->items, d->uid, found);
-
			if (found != NULL) {
-
				LL_FOREACH(found, cur) {
-
					if (cur->priority >= maxpri) {
-
						maxpri = cur->priority + 1;
-
					}
+
			if (found == NULL)
+
				continue;
+
			LL_FOREACH(found, cur) {
+
				if (cur->priority >= maxpri) {
+
					maxpri = cur->priority + 1;
				}
			}
		}