- fix: Fwrite's are optimized out by aggressive compiler(irix) (#34711).
authorjbj <devnull@localhost>
Tue, 17 Apr 2001 18:30:23 +0000 (18:30 +0000)
committerjbj <devnull@localhost>
Tue, 17 Apr 2001 18:30:23 +0000 (18:30 +0000)
CVS patchset: 4684
CVS date: 2001/04/17 18:30:23

CHANGES
build/pack.c
lib/rpmlead.c

diff --git a/CHANGES b/CHANGES
index d8a0968..f2bb5a7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,7 @@
        - fix: %_netsharedpath needs to look at basenames (#26561).
        - fix: --excludepath was broken (#24434).
        - fix: s390 (and ppc?) could return CPIOERR_BAD_HEADER (#28645).
+       - fix: Fwrite's are optimized out by aggressive compiler(irix) (#34711).
 
 4.0 -> 4.0.[12]
        - add doxygen and lclint annotations most everywhere.
index e101f33..f6dd4aa 100644 (file)
@@ -540,7 +540,7 @@ int writeRPM(Header *hdrp, const char *fileName, int type,
            rc = RPMERR_READ;
            goto exit;
        }
-       if (Fwrite(buf, sizeof(buf[0]), count, fd) < 0) {
+       if (Fwrite(buf, sizeof(buf[0]), count, fd) != count) {
            rpmError(RPMERR_NOSPACE, _("Unable to write payload to %s: %s\n"),
                     fileName, Fstrerror(fd));
            rc = RPMERR_NOSPACE;
index 1336b61..9b262e1 100644 (file)
@@ -35,7 +35,7 @@ int writeLead(FD_t fd, struct rpmlead *lead)
     l.osnum = htons(l.osnum);
     l.signature_type = htons(l.signature_type);
        
-    if (Fwrite(&l, sizeof(char), sizeof(l), fd) < 0) {
+    if (Fwrite(&l, sizeof(char), sizeof(l), fd) != sizeof(l)) {
        return 1;
     }