]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/file.c
Fix stuck multi-file jobs (Issue #5359, Issue #5413)
[thirdparty/cups.git] / scheduler / file.c
index 0d236c918bd4b0f951bbee1ccec220157c688781..a2f723a99a5b0e055c06b67011b86883d0d8a438 100644 (file)
@@ -1,30 +1,11 @@
 /*
- * "$Id$"
+ * File functions for the CUPS scheduler.
  *
- *   File functions for the CUPS scheduler.
+ * Copyright © 2007-2014 by Apple Inc.
+ * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
- *   Copyright 2007-2013 by Apple Inc.
- *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
- *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   "LICENSE" which should have been included with this file.  If this
- *   file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * Contents:
- *
- *   cupsdCleanFiles()          - Clean out old files.
- *   cupsdCloseCreatedConfFile() - Close a created configuration file and move
- *                                into place.
- *   cupsdClosePipe()           - Close a pipe as necessary.
- *   cupsdCreateConfFile()      - Create a configuration file safely.
- *   cupsdOpenConfFile()        - Open a configuration file.
- *   cupsdOpenPipe()            - Create a pipe which is closed on exec.
- *   cupsdRemoveFile()          - Remove a file securely.
- *   cupsdUnlinkOrRemoveFile()  - Unlink or securely remove a file depending
- *                                on the configuration.
- *   overwrite_data()           - Overwrite the data in a file.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  */
 
 /*
@@ -445,7 +426,7 @@ overwrite_data(int        fd,               /* I - File descriptor */
     else
       bytes = filesize;
 
-    if ((bytes = write(fd, buffer, bytes)) < 0)
+    if ((bytes = write(fd, buffer, (size_t)bytes)) < 0)
       return (-1);
 
     filesize -= bytes;
@@ -458,8 +439,3 @@ overwrite_data(int        fd,               /* I - File descriptor */
   return (fsync(fd));
 }
 #endif /* HAVE_REMOVEFILE */
-
-
-/*
- * End of "$Id$".
- */