Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
quality: remove more dead assignement
Baptiste Daroussin committed 4 years ago
commit da1a478eac21973dfc46a9148d0c404734c464fe
parent d773e9e
5 files changed +6 -8
modified libpkg/pkg_repo_create.c
@@ -747,7 +747,7 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
	ntask = 0;
	remaining_workers = num_workers;
	while(remaining_workers > 0) {
-
		int st, r;
+
		int st;

		pkg_debug(1, "checking for %d workers", remaining_workers);
		retcode = poll(pfd, num_workers, -1);
@@ -763,7 +763,7 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
			for (i = 0; i < num_workers; i ++) {
				if (pfd[i].fd != -1 &&
								(pfd[i].revents & (POLLIN|POLLHUP|POLLERR))) {
-
					if ((r = pkg_create_repo_read_pipe(pfd[i].fd, &dlist)) != EPKG_OK) {
+
					if (pkg_create_repo_read_pipe(pfd[i].fd, &dlist) != EPKG_OK) {
						/*
						 * Wait for the worker finished
						 */
modified libpkg/pkg_solve.c
@@ -1464,10 +1464,9 @@ pkg_solve_parse_sat_output(FILE *f, struct pkg_solve_problem *problem)
	int ret = EPKG_OK;
	char *line = NULL, *var_str, *begin;
	size_t linecap = 0;
-
	ssize_t linelen;
	bool got_sat = false, done = false;

-
	while ((linelen = getline(&line, &linecap, f)) > 0) {
+
	while (getline(&line, &linecap, f) > 0) {
		if (strncmp(line, "SAT", 3) == 0) {
			got_sat = true;
		}
modified src/audit.c
@@ -363,7 +363,7 @@ exec_audit(int argc, char **argv)
			ret = EXIT_FAILURE;
		}
		else {
-
			while ((ret = pkgdb_it_next(it, &pkg, PKG_LOAD_BASIC|PKG_LOAD_RDEPS))
+
			while (pkgdb_it_next(it, &pkg, PKG_LOAD_BASIC|PKG_LOAD_RDEPS)
							== EPKG_OK) {
				add_to_check(check, pkg);
				pkg = NULL;
modified src/lock.c
@@ -114,7 +114,7 @@ do_lock_unlock(struct pkgdb *db, int match, const char *pkgname,
		goto cleanup;
	}

-
	while ((retcode = pkgdb_it_next(it, &pkg, 0)) == EPKG_OK) {
+
	while (pkgdb_it_next(it, &pkg, 0) == EPKG_OK) {
		if (action == LOCK)
			retcode = do_lock(db, pkg);
		else
modified src/updating.c
@@ -241,7 +241,6 @@ exec_updating(int argc, char **argv)
	int			 ch;
	char			*line = NULL;
	size_t			 linecap = 0;
-
	ssize_t			 linelen;
	char			*tmp;
	int			 head = 0;
	int			 found = 0;
@@ -346,7 +345,7 @@ exec_updating(int argc, char **argv)
		}
	}

-
	while ((linelen = getline(&line, &linecap, fd)) > 0) {
+
	while (getline(&line, &linecap, fd) > 0) {
		if (strspn(line, "0123456789:") == 9) {
			dateline = strdup(line);
			found = 0;