Eliminate couple of timedRead() uses where we control how fd is opened
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 7 Jul 2008 10:28:04 +0000 (13:28 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 7 Jul 2008 10:28:04 +0000 (13:28 +0300)
lib/header.c
lib/signature.c

index 569ef9f..2f3d7a0 100644 (file)
@@ -1083,7 +1083,6 @@ exit:
        h->flags |= HEADERFLAG_ALLOCATED;
     } else if (ei)
        ei = _free(ei);
-       /* FIX: timedRead macro obscures annotation */
     return h;
 }
 
index 205a024..67f70ab 100644 (file)
@@ -465,9 +465,9 @@ static int makePGPSignature(const char * file, rpmSigTag * sigTagp,
     {  FD_t fd;
 
        rc = 0;
-       fd = Fopen(sigfile, "r.fdio");
+       fd = Fopen(sigfile, "r.ufdio");
        if (fd != NULL && !Ferror(fd)) {
-           rc = timedRead(fd, (void *)*pktp, *pktlenp);
+           rc = Fread(*pktp, sizeof(**pktp), *pktlenp, fd);
            if (sigfile) (void) unlink(sigfile);
            (void) Fclose(fd);
        }
@@ -582,9 +582,9 @@ static int makeGPGSignature(const char * file, rpmSigTag * sigTagp,
     {  FD_t fd;
 
        rc = 0;
-       fd = Fopen(sigfile, "r.fdio");
+       fd = Fopen(sigfile, "r.ufdio");
        if (fd != NULL && !Ferror(fd)) {
-           rc = timedRead(fd, (void *)*pktp, *pktlenp);
+           rc = Fread(*pktp, sizeof(**pktp), *pktlenp, fd);
            (void) Fclose(fd);
        }
        if (rc != *pktlenp) {