From 4a434f9fd1690223e6bc76fb0e79b353800e1f9e Mon Sep 17 00:00:00 2001 From: deepak0405 Date: Mon, 20 May 2019 22:01:48 +0530 Subject: [PATCH] implicitclass : Removed warning related to dup --- backend/implicitclass.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/implicitclass.c b/backend/implicitclass.c index 2ef9f512e..2268d9e70 100644 --- a/backend/implicitclass.c +++ b/backend/implicitclass.c @@ -138,7 +138,7 @@ main(int argc, /* I - Number of command-line args */ int bytes; /* Bytes copied */ char uri[HTTP_MAX_URI]; char *argv_nt[7]; - int outbuflen,filefd,exit_status; + int outbuflen,filefd,exit_status,dup_status; static const char *pattrs[] = { "printer-defaults" @@ -369,7 +369,11 @@ main(int argc, /* I - Number of command-line args */ find whether the filter worked correctly and what was the document-format of the filtered output.*/ close(1); - /*dup(filefd);*/ + dup_status = dup(filefd); + if(dup_status < 0) { + fprintf(stderr, "Could not write the output of pdftoippprinter printer to tmp file\n"); + return CUPS_BACKEND_FAILED; + } /* Calling pdftoippprinter.c filter*/ apply_filters(7,argv_nt); -- 2.47.2