diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-12-04 04:12:42 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-12-04 04:12:42 +0000 |
commit | fb9b398d0e3ec2ff3b882298dd18d4696d051787 (patch) | |
tree | a490714ecee33cdafa3f97b773bbb3580194461e /loader2 | |
parent | 2f2e07419d1aa71bbad91d542e4e27e95ceff5f7 (diff) | |
download | anaconda-fb9b398d0e3ec2ff3b882298dd18d4696d051787.tar.gz anaconda-fb9b398d0e3ec2ff3b882298dd18d4696d051787.tar.xz anaconda-fb9b398d0e3ec2ff3b882298dd18d4696d051787.zip |
need to initialize the pointers, otherwise they have random junk in them which throws off the other logic here
Diffstat (limited to 'loader2')
-rw-r--r-- | loader2/net.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/loader2/net.c b/loader2/net.c index da55d7a5f..ff27f3f4f 100644 --- a/loader2/net.c +++ b/loader2/net.c @@ -591,7 +591,7 @@ int findHostAndDomain(struct networkDeviceConfig * dev, int flags) { void setKickstartNetwork(struct loaderData_s * loaderData, int argc, char ** argv, int * flagsPtr) { - char * arg, * bootProto, * device; + char * arg, * bootProto = NULL, * device = NULL;; int noDns = 0, rc; poptContext optCon; @@ -644,7 +644,8 @@ void setKickstartNetwork(struct loaderData_s * loaderData, int argc, /* if they've specified dhcp/bootp or haven't specified anything, * use dhcp for the interface */ - if (!strncmp(bootProto, "dhcp", 4) || !strncmp(bootProto, "bootp", 4) || + if ((bootProto && (!strncmp(bootProto, "dhcp", 4) || + !strncmp(bootProto, "bootp", 4))) || (!bootProto && !loaderData->ip)) { loaderData->ip = strdup("dhcp"); loaderData->ipinfo_set = 1; |