diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-03-20 19:03:17 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-03-20 19:11:55 +0100 |
commit | 93fc79a5b2826bcddd617e5180d5513dc3cdc67c (patch) | |
tree | 482a6c030e1721ef27cf2bb1c6a9fb8df890b4dd /src | |
parent | 3785fc5ea7f47849ae11764b5cca5c220bc3866d (diff) | |
download | blogc-93fc79a5b2826bcddd617e5180d5513dc3cdc67c.tar.gz blogc-93fc79a5b2826bcddd617e5180d5513dc3cdc67c.tar.bz2 blogc-93fc79a5b2826bcddd617e5180d5513dc3cdc67c.zip |
blogc: loader: respect FILTER_PER_PAGE=0
Diffstat (limited to 'src')
-rw-r--r-- | src/blogc/loader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blogc/loader.c b/src/blogc/loader.c index 881661b..c54b285 100644 --- a/src/blogc/loader.c +++ b/src/blogc/loader.c @@ -138,8 +138,8 @@ blogc_source_parse_from_files(bc_trie_t *conf, bc_slist_t *l, bc_error_t **err) if (*ptr != '\0' && *endptr != '\0') fprintf(stderr, "warning: invalid value for 'FILTER_PER_PAGE' variable: " "%s. using %ld instead\n", ptr, per_page); - if (per_page <= 0) - per_page = 10; + if (per_page < 0) + per_page = 0; // poor man's pagination unsigned int start = (page - 1) * per_page; |