Diff options
Diffstat (limited to '')
| -rw-r--r-- | source/cgit.c | 5 |
1 file changed, 1 insertion, 4 deletions
diff --git a/source/cgit.c b/source/cgit.c index dbce55b..10ed536 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -725,10 +725,7 @@ static void apply_query_param(const char *name, const char *value) } else if (!strcmp(name, "qt")) { ctx.qry.grep = xstrdup(value); } else if (!strcmp(name, "q")) { - if (strlen(value) > MAX_SEARCH_LEN) - ctx.qry.search = xstrndup(value, MAX_SEARCH_LEN); - else - ctx.qry.search = xstrdup(value); + ctx.qry.search = xstrndup(value, MAX_SEARCH_LEN); } else if (!strcmp(name, "h")) { ctx.qry.head = xstrdup(value); } else if (!strcmp(name, "id")) { |
