From 6236d7ae41c1cc5327ba520f5999adea2022097e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 22 Feb 2020 14:18:35 +0100 Subject: [PATCH] xbps-query/search.c: use unsigned int and remove wrong cast. --- bin/xbps-query/search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/xbps-query/search.c b/bin/xbps-query/search.c index a34e3c45..720c7b8e 100644 --- a/bin/xbps-query/search.c +++ b/bin/xbps-query/search.c @@ -46,7 +46,7 @@ struct search_data { bool regex, repo_mode; regex_t regexp; - int maxcols; + unsigned int maxcols; const char *pat, *prop, *repourl; xbps_array_t results; }; @@ -79,7 +79,7 @@ print_results(struct xbps_handle *xhp, struct search_data *sd) inststr = "[-]"; len = strlen(inststr) + strlen(tmp) + strlen(desc) + 3; - if (sd->maxcols && (int)len > sd->maxcols) { + if (sd->maxcols && len > sd->maxcols) { out = malloc(sd->maxcols+1); assert(out); snprintf(out, sd->maxcols-3, "%s %s %s",