summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-12-13 16:47:54 -0500
committerBill Nottingham <notting@redhat.com>2007-12-13 16:47:54 -0500
commit3a841429e7b0c7c955f0082d5c70e8522812688e (patch)
tree1168cfb8fa1dadfa091e6ed80f8669b286cbde7d /loader2
parentaf9e0e9a6a09ce633c0032695e86448cd8ccc68b (diff)
parent63b3830f6ae399469484836780594fd179e5e1d5 (diff)
downloadanaconda-3a841429e7b0c7c955f0082d5c70e8522812688e.tar.gz
anaconda-3a841429e7b0c7c955f0082d5c70e8522812688e.tar.xz
anaconda-3a841429e7b0c7c955f0082d5c70e8522812688e.zip
Merge branch 'master' of git+ssh://git.fedorahosted.org/git/anaconda
Diffstat (limited to 'loader2')
-rw-r--r--loader2/nfsinstall.c4
-rw-r--r--loader2/urls.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index d681de646..eca7ac5d8 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -345,12 +345,10 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
tip = &(netCfg.dev.nextServer);
if (!(netCfg.dev.set & PUMP_INTFINFO_HAS_BOOTFILE)) {
inet_ntop(tip->sa_family, IP_ADDR(tip), ret, IP_STRLEN(tip));
- ip = strdup(ret);
i = asprintf(&url, "%s:%s", ret, "/kickstart/");
logMessage(ERROR, "bootp: no bootfile received");
} else {
inet_ntop(tip->sa_family, IP_ADDR(tip), ret, IP_STRLEN(tip));
- ip = strdup(ret);
i = asprintf(&url, "%s:%s", ret, netCfg.dev.bootFile);
logMessage(INFO, "bootp: bootfile is %s", netCfg.dev.bootFile);
}
@@ -358,7 +356,7 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
/* get the IP of the target system */
netlink_init_interfaces_list();
- if (ip == NULL && (ip = netlink_interfaces_ip2str(loaderData->netDev)) == NULL) {
+ if ((ip = netlink_interfaces_ip2str(loaderData->netDev)) == NULL) {
logMessage(ERROR, "netlink_interfaces_ip2str returned NULL");
return 1;
}
diff --git a/loader2/urls.c b/loader2/urls.c
index b692d2a8a..672234e07 100644
--- a/loader2/urls.c
+++ b/loader2/urls.c
@@ -270,7 +270,7 @@ char * addrToIp(char * hostname) {
int urlMainSetupPanel(struct iurlinfo * ui, char * doSecondarySetup) {
newtComponent form, okay, cancel, urlEntry;
newtComponent answer, text, proxyCheckbox;
- char *url;
+ char *url = "";
char * reflowedText = NULL;
int width, height;
newtGrid buttons, grid;
@@ -284,7 +284,8 @@ int urlMainSetupPanel(struct iurlinfo * ui, char * doSecondarySetup) {
*doSecondarySetup = ' ';
/* Populate the UI with whatever initial value we've got. */
- url = convertUIToURL(ui);
+ if (ui)
+ url = convertUIToURL(ui);
buttons = newtButtonBar(_("OK"), &okay, _("Back"), &cancel, NULL);