summaryrefslogtreecommitdiff
path: root/networking/ftpgetput.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-16 23:49:13 +0000
committerDenis Vlasenko2006-12-16 23:49:13 +0000
commit9f739445cd3deddd0343c3a8d5a981ede26bef30 (patch)
tree6dc013e44d2281eb1e6f61c4bca1ae7546001f79 /networking/ftpgetput.c
parenta597aaddfa76d589d3e1a37b1f1c3401c2decffd (diff)
downloadbusybox-9f739445cd3deddd0343c3a8d5a981ede26bef30.zip
busybox-9f739445cd3deddd0343c3a8d5a981ede26bef30.tar.gz
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
Diffstat (limited to 'networking/ftpgetput.c')
-rw-r--r--networking/ftpgetput.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 223d243..dff8944 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -132,7 +132,7 @@ int ftp_receive(ftp_host_info_t *server, FILE *control_stream,
do_continue = 0;
}
- if ((local_path[0] == '-') && (local_path[1] == '\0')) {
+ if (LONE_DASH(local_path)) {
fd_local = STDOUT_FILENO;
do_continue = 0;
}
@@ -212,9 +212,8 @@ int ftp_send(ftp_host_info_t *server, FILE *control_stream,
fd_data = xconnect_ftpdata(server, buf);
/* get the local file */
- if ((local_path[0] == '-') && (local_path[1] == '\0')) {
- fd_local = STDIN_FILENO;
- } else {
+ fd_local = STDIN_FILENO;
+ if (NOT_LONE_DASH(local_path)) {
fd_local = xopen(local_path, O_RDONLY);
fstat(fd_local, &sbuf);