From 38fc176ea653a28eb49c85ddb4a67798d10e0f23 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 23 Nov 2020 15:36:17 +0100 Subject: [PATCH] cups-browsed.c: Add resolutionNew() to public API and missing brackets --- cupsfilters/ppdgenerator.h | 1 + utils/cups-browsed.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cupsfilters/ppdgenerator.h b/cupsfilters/ppdgenerator.h index 050c32019..027b9752e 100644 --- a/cupsfilters/ppdgenerator.h +++ b/cupsfilters/ppdgenerator.h @@ -73,6 +73,7 @@ int compare_resolutions(void *resolution_a, void *resolution_b, void *user_data); void free_resolution(void *resolution, void *user_data); res_t * ippResolutionToRes(ipp_attribute_t *attr, int index); +res_t * resolutionNew(int x, int y); cups_array_t * resolutionArrayNew(); cups_array_t* generate_sizes(ipp_t *response, ipp_attribute_t **defattr, diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c index f47b81151..89c403fc5 100644 --- a/utils/cups-browsed.c +++ b/utils/cups-browsed.c @@ -6535,12 +6535,14 @@ on_job_state (CupsNotifier *object, min_res->x = res->x; min_res->y = res->y; } else { - if(compare_resolutions((void *)res,(void *)max_res,NULL) > 0) + if(compare_resolutions((void *)res,(void *)max_res,NULL) > 0) { max_res->x = res->x; max_res->y = res->y; - if(compare_resolutions((void *)res,(void *)min_res,NULL) < 0) + } + if(compare_resolutions((void *)res,(void *)min_res,NULL) < 0) { min_res->x = res->x; min_res->y = res->y; + } } free_resolution(res, NULL); res = NULL; -- 2.47.2