summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-12-19 19:55:14 +0000
committerjbj <devnull@localhost>1999-12-19 19:55:14 +0000
commit6e704014b740394aba2452f8fb78726925a78dcf (patch)
tree6bd07fbf337fe250043acf93545e341bbdbd8f78 /lib
parente6c1c88e7c0ab49ebfc35c18319b731d187be760 (diff)
downloadrpm-6e704014b740394aba2452f8fb78726925a78dcf.tar.gz
rpm-6e704014b740394aba2452f8fb78726925a78dcf.tar.bz2
rpm-6e704014b740394aba2452f8fb78726925a78dcf.zip
Initialize values behind pointers before calling rpmGet{Arch,Os}Info.
Sanity (make dist). CVS patchset: 3492 CVS date: 1999/12/19 19:55:14
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmrc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 350537d78..3dc3e5cf0 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -1205,17 +1205,18 @@ void rpmRebuildTargetVars(const char **buildtarget, const char ** canontarget)
if (co != NULL) co = xstrdup(co);
}
} else {
- const char *a, *o;
+ const char *a = NULL;
+ const char *o = NULL;
/* Set build target from rpm arch and os */
- rpmGetArchInfo(&a,NULL);
+ rpmGetArchInfo(&a, NULL);
ca = (a) ? xstrdup(a) : NULL;
- rpmGetOsInfo(&o,NULL);
+ rpmGetOsInfo(&o, NULL);
co = (o) ? xstrdup(o) : NULL;
}
/* If still not set, Set target arch/os from default uname(2) values */
if (ca == NULL) {
- const char *a;
+ const char *a = NULL;
defaultMachine(&a, NULL);
ca = (a) ? xstrdup(a) : NULL;
}
@@ -1223,7 +1224,7 @@ void rpmRebuildTargetVars(const char **buildtarget, const char ** canontarget)
ca[x] = tolower(ca[x]);
if (co == NULL) {
- const char *o;
+ const char *o = NULL;
defaultMachine(NULL, &o);
co = (o) ? xstrdup(o) : NULL;
}