Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 78230 | Differences between
and this patch

Collapse All | Expand All

(-)vdr-1.2.6/dvbdevice.c.orig (-3 / +6 lines)
Lines 505-512 Link Here
505
              Quality = 255; //XXX is this 'best'???
505
              Quality = 255; //XXX is this 'best'???
506
506
507
           isyslog("grabbing to %s (%s %d %d %d)", FileName, Jpeg ? "JPEG" : "PNM", Quality, vm.width, vm.height);
507
           isyslog("grabbing to %s (%s %d %d %d)", FileName, Jpeg ? "JPEG" : "PNM", Quality, vm.width, vm.height);
508
           FILE *f = fopen(FileName, "wb");
508
           int fd = open(FileName, O_CREAT | O_EXCL | O_TRUNC | O_RDWR, 0600);
509
           if (f) {
509
           if (fd > -1) {
510
             FILE *f = fdopen(fd, "wb");
511
             if (f) {
510
              if (Jpeg) {
512
              if (Jpeg) {
511
                 // write JPEG file:
513
                 // write JPEG file:
512
                 struct jpeg_compress_struct cinfo;
514
                 struct jpeg_compress_struct cinfo;
Lines 540-546 Link Here
540
                    }
542
                    }
541
                 }
543
                 }
542
              fclose(f);
544
              fclose(f);
543
              }
545
            }
546
	   }
544
           else {
547
           else {
545
              LOG_ERROR_STR(FileName);
548
              LOG_ERROR_STR(FileName);
546
              result |= 1;
549
              result |= 1;

Return to bug 78230