Skip to content

Commit f90699e

Browse files
Merge pull request #121 from deepak0405/master
cups-browsed, implicitclass: Corrected Code Styling - Spaces, case-insensitive comparison of option/choice names, return value of dup() function call.
2 parents 64a410a + 4a434f9 commit f90699e

File tree

3 files changed

+115
-108
lines changed

3 files changed

+115
-108
lines changed

backend/implicitclass.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ main(int argc, /* I - Number of command-line args */
138138
int bytes; /* Bytes copied */
139139
char uri[HTTP_MAX_URI];
140140
char *argv_nt[7];
141-
int outbuflen,filefd,exit_status;
141+
int outbuflen,filefd,exit_status,dup_status;
142142
static const char *pattrs[] =
143143
{
144144
"printer-defaults"
@@ -369,7 +369,11 @@ main(int argc, /* I - Number of command-line args */
369369
find whether the filter worked correctly and what was the
370370
document-format of the filtered output.*/
371371
close(1);
372-
/*dup(filefd);*/
372+
dup_status = dup(filefd);
373+
if(dup_status < 0) {
374+
fprintf(stderr, "Could not write the output of pdftoippprinter printer to tmp file\n");
375+
return CUPS_BACKEND_FAILED;
376+
}
373377

374378
/* Calling pdftoippprinter.c filter*/
375379
apply_filters(7,argv_nt);

cupsfilters/ppdgenerator.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ typedef struct _pwg_finishings_s /**** PWG finishings mapping data ****/
7777
#define _PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 2)
7878

7979
static void pwg_ppdize_name(const char *ipp, char *name, size_t namesize);
80-
static void pwg_ppdize_resolution(ipp_attribute_t *attr, int element, int *xres, int *yres, char *name, size_t namesize);
80+
static void pwg_ppdize_resolution(ipp_attribute_t *attr, int element,
81+
int *xres, int *yres, char *name, size_t namesize);
8182

8283
/*
8384
* '_cupsSetError()' - Set the last PPD generator status-message.

0 commit comments

Comments
 (0)