diff options
-rw-r--r-- | networking/ftpgetput.c | 24 | ||||
-rw-r--r-- | networking/nameif.c | 10 |
2 files changed, 13 insertions, 21 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 7a0ba7772..f285e8b31 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -122,7 +122,9 @@ static FILE *ftp_login(ftp_host_info_t *server) | |||
122 | return(control_stream); | 122 | return(control_stream); |
123 | } | 123 | } |
124 | 124 | ||
125 | #ifdef CONFIG_FTPGET | 125 | #if !ENABLE_FTPGET |
126 | #define ftp_receive 0 | ||
127 | #else | ||
126 | static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream, | 128 | static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream, |
127 | const char *local_path, char *server_path) | 129 | const char *local_path, char *server_path) |
128 | { | 130 | { |
@@ -207,7 +209,9 @@ static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream, | |||
207 | } | 209 | } |
208 | #endif | 210 | #endif |
209 | 211 | ||
210 | #ifdef CONFIG_FTPPUT | 212 | #if !ENABLE_FTPPUT |
213 | #define ftp_send 0 | ||
214 | #else | ||
211 | static int ftp_send(ftp_host_info_t *server, FILE *control_stream, | 215 | static int ftp_send(ftp_host_info_t *server, FILE *control_stream, |
212 | const char *server_path, char *local_path) | 216 | const char *server_path, char *local_path) |
213 | { | 217 | { |
@@ -299,24 +303,12 @@ int ftpgetput_main(int argc, char **argv) | |||
299 | int (*ftp_action)(ftp_host_info_t *, FILE *, const char *, char *) = NULL; | 303 | int (*ftp_action)(ftp_host_info_t *, FILE *, const char *, char *) = NULL; |
300 | 304 | ||
301 | /* Check to see if the command is ftpget or ftput */ | 305 | /* Check to see if the command is ftpget or ftput */ |
302 | #ifdef CONFIG_FTPPUT | 306 | if (ENABLE_FTPPUT && (!ENABLE_FTPGET || bb_applet_name[3] == 'p')) { |
303 | # ifdef CONFIG_FTPGET | ||
304 | if (bb_applet_name[3] == 'p') { | ||
305 | ftp_action = ftp_send; | 307 | ftp_action = ftp_send; |
306 | } | 308 | } |
307 | # else | 309 | if (ENABLE_FTPGET && (!ENABLE_FTPPUT || bb_applet_name[3] == 'g')) { |
308 | ftp_action = ftp_send; | ||
309 | # endif | ||
310 | #endif | ||
311 | #ifdef CONFIG_FTPGET | ||
312 | # ifdef CONFIG_FTPPUT | ||
313 | if (bb_applet_name[3] == 'g') { | ||
314 | ftp_action = ftp_recieve; | 310 | ftp_action = ftp_recieve; |
315 | } | 311 | } |
316 | # else | ||
317 | ftp_action = ftp_recieve; | ||
318 | # endif | ||
319 | #endif | ||
320 | 312 | ||
321 | /* Set default values */ | 313 | /* Set default values */ |
322 | server = xmalloc(sizeof(ftp_host_info_t)); | 314 | server = xmalloc(sizeof(ftp_host_info_t)); |
diff --git a/networking/nameif.c b/networking/nameif.c index f28e5ebe3..8590a98ad 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
@@ -184,11 +184,11 @@ int nameif_main(int argc, char **argv) | |||
184 | } | 184 | } |
185 | if (ch->next != NULL) | 185 | if (ch->next != NULL) |
186 | (ch->next)->prev = ch->prev; | 186 | (ch->next)->prev = ch->prev; |
187 | #ifdef CONFIG_FEATURE_CLEAN_UP | 187 | if (ENABLE_FEATURE_CLEAN_UP) { |
188 | free(ch->ifname); | 188 | free(ch->ifname); |
189 | free(ch->mac); | 189 | free(ch->mac); |
190 | free(ch); | 190 | free(ch); |
191 | #endif | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
194 | return 0; | 194 | return 0; |