diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-07-01 07:49:05 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-07-01 07:49:05 +0000 |
commit | 9b47042e86cb3827515b4df62faca63f08b2fbdd (patch) | |
tree | e42cd38ad1aae12b9f3d98a26ffd759b50b5068b /mdk-stage1 | |
parent | 34eed59c1db310839da45fed0f9dcbe182267e8c (diff) | |
download | drakx-9b47042e86cb3827515b4df62faca63f08b2fbdd.tar drakx-9b47042e86cb3827515b4df62faca63f08b2fbdd.tar.gz drakx-9b47042e86cb3827515b4df62faca63f08b2fbdd.tar.bz2 drakx-9b47042e86cb3827515b4df62faca63f08b2fbdd.tar.xz drakx-9b47042e86cb3827515b4df62faca63f08b2fbdd.zip |
rephrase previous patch, with correct indentation this time
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/network.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index d307e414b..0e5ec4560 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -924,12 +924,8 @@ enum return_type ftp_prepare(void) use_http_proxy = !streq(http_proxy_host, "") && !streq(http_proxy_port, ""); - if (answers[1][0] == '/') { - strcpy(location_full, answers[1]); - } else { - strcpy(location_full, "/"); - strcat(location_full, answers[1]); - } + strcpy(location_full, answers[1][0] == '/' ? "" : "/"); + strcat(location_full, answers[1]); if (use_http_proxy) { log_message("FTP: don't connect to %s directly, will use proxy", answers[0]); @@ -1061,12 +1057,8 @@ enum return_type http_prepare(void) return http_prepare(); } - if (answers[1][0] == '/') { - strcpy(location_full, answers[1]); - } else { - strcpy(location_full, "/"); - strcat(location_full, answers[1]); - } + strcpy(location_full, answers[1][0] == '/' ? "" : "/"); + strcat(location_full, answers[1]); strcat(location_full, get_ramdisk_realname()); log_message("HTTP: trying to retrieve %s from %s", location_full, answers[0]); |