From: Andre Noll Date: Fri, 28 Dec 2007 13:05:53 +0000 (+0100) Subject: com_lsatt(): Fix error message. X-Git-Tag: v0.3.0~23 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=2ce53a38d821d67cdf7a7082f9c42da88516e890;p=paraslash.git com_lsatt(): Fix error message. We must not use PARA_STRERROR(-ret) if ret is zero. --- diff --git a/attribute.c b/attribute.c index 5f7188ee..dd1be5d8 100644 --- a/attribute.c +++ b/attribute.c @@ -200,13 +200,15 @@ int com_lsatt(int fd, int argc, char * const * const argv) continue; } } - ret = send_option_arg_callback_request(&options, argc -i, argv + i, + ret = send_option_arg_callback_request(&options, argc - i, argv + i, com_lsatt_callback, &result); if (ret > 0) { ret = send_buffer(fd, (char *)result.data); free(result.data); - } else + } else if (ret < 0) send_va_buffer(fd, "%s\n", PARA_STRERROR(-ret)); + else if (argc > 1) + send_va_buffer(fd, "no matches\n"); return ret; }