Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Initialize pointers to silent gcc warnings.
jlaffaye committed 14 years ago
commit 6d19b3572ffb1ca82f74326709824bfc7f5423ed
parent 3d7a9e3
2 files changed +7 -7
modified libpkg/pkg_manifest.c
@@ -343,13 +343,13 @@ parse_mapping(struct pkg *pkg, yaml_node_t *item, yaml_document_t *doc, int attr

static int
pkg_set_files_from_node(struct pkg *pkg, yaml_node_t *item, yaml_document_t *doc, const char *filename) {
-
	yaml_node_pair_t *pair;
-
	yaml_node_t *key;
-
	yaml_node_t *val;
+
	yaml_node_pair_t *pair = NULL;
+
	yaml_node_t *key = NULL;
+
	yaml_node_t *val = NULL;
	const char *sum = NULL;
	const char *uname = NULL;
	const char *gname = NULL;
-
	void *set;
+
	void *set = NULL;
	mode_t perm = 0;

	pair = item->data.mapping.pairs.start;
@@ -609,7 +609,7 @@ pkg_emit_manifest(struct pkg *pkg, char **dest)
	int files = -1;
	int options = -1;
	int scripts = -1;
-
	const char *script_types;
+
	const char *script_types = NULL;
	struct sbuf *destbuf = sbuf_new_auto();

	yaml_emitter_initialize(&emitter);
modified libpkg/pkgdb.c
@@ -1771,8 +1771,8 @@ pkgdb_rquery(struct pkgdb *db, const char *pattern, match_t match, pkgdb_field f
{
	sqlite3_stmt *stmt = NULL;
	struct sbuf *sql = sbuf_new_auto();
-
	const char *what;
-
	const char *how;
+
	const char *what = NULL;
+
	const char *how = NULL;

	assert(pattern != NULL && pattern[0] != '\0');