Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix Dead assignments found with scan-build.
Alexandre Perrin committed 12 years ago
commit 3eede04ceae3d8bae926d9777051db50ee1d2c3b
parent c229a8d
3 files changed +5 -5
modified libpkg/fetch.c
@@ -390,7 +390,6 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, time_t *t
	int64_t		 max_retry, retry;
	int64_t		 fetch_timeout;
	time_t		 begin_dl;
-
	time_t		 now;
	time_t		 last = 0;
	char		 buf[10240];
	char		*doc = NULL;
@@ -533,12 +532,14 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, time_t *t
		sz = st.size;
	}

-
	now = begin_dl = time(NULL);
+
	begin_dl = time(NULL);
	if (repo != NULL) {
		repo->tofetch = sz;
		repo->fetched = 0;
	}
	while (done < sz) {
+
		time_t	now;
+

		if ((r = fread(buf, 1, sizeof(buf), remote)) < 1)
			break;

modified libpkg/pkg_config.c
@@ -292,8 +292,8 @@ static struct config_entry c[] = {
static bool parsed = false;
static size_t c_size = sizeof(c) / sizeof(struct config_entry);

-
static void pkg_config_kv_free(struct pkg_config_kv *);
-
static struct pkg_repo *pkg_repo_new(const char *name, const char *url);
+
static void		 pkg_config_kv_free(struct pkg_config_kv *);
+
static struct pkg_repo	*pkg_repo_new(const char *name, const char *url);

static void
connect_evpipe(const char *evpipe) {
modified pkg/main.c
@@ -685,7 +685,6 @@ main(int argc, char **argv)

	newargv = argv;
	newargc = argc;
-
	len = strlen(argv[0]);
	alias = NULL;
	while (pkg_config_kvlist(PKG_CONFIG_ALIAS, &alias) == EPKG_OK) {
		if (strcmp(argv[0], pkg_config_kv_get(alias, PKG_CONFIG_KV_KEY)) == 0) {