]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
cups-browsed.c: Add resolutionNew() to public API and missing brackets 322/head
authorZdenek Dohnal <zdohnal@redhat.com>
Mon, 23 Nov 2020 14:36:17 +0000 (15:36 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Mon, 23 Nov 2020 14:36:17 +0000 (15:36 +0100)
cupsfilters/ppdgenerator.h
utils/cups-browsed.c

index 050c32019cc6b8f7b80be75bcf71d1ea2dd177c7..027b9752e20a0b8fd811cbb3341b9c3f144d22b8 100644 (file)
@@ -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,
index f47b811518004698c8290bca1d9aa2ef74d8eba7..89c403fc5ce5f852d209a7df1b5f66a0595b0b8a 100644 (file)
@@ -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;