We must not use PARA_STRERROR(-ret) if ret is zero.
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;
}