com_touch: Only print error message on errors.
authorAndre Noll <maan@systemlinux.org>
Wed, 24 Oct 2007 15:29:07 +0000 (17:29 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 24 Oct 2007 15:29:07 +0000 (17:29 +0200)
aft.c

diff --git a/aft.c b/aft.c
index d0580bb..85ceee9 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1927,7 +1927,7 @@ int com_touch(int fd, int argc, char * const * const argv)
        if (ret > 0) {
                send_buffer(fd, (char *)result.data);
                free(result.data);
        if (ret > 0) {
                send_buffer(fd, (char *)result.data);
                free(result.data);
-       } else
+       } else if (ret < 0)
                send_va_buffer(fd, "%s\n", PARA_STRERROR(-ret));
        return ret;
 }
                send_va_buffer(fd, "%s\n", PARA_STRERROR(-ret));
        return ret;
 }