diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-10-29 09:42:21 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-10-29 09:42:21 +0200 |
commit | 1fe38d71cc4049175b1a0ba7c493e20665880692 (patch) | |
tree | 98b07f909525d095649249d0737888d0a03494c0 | |
parent | 46e669f06e9a66f1833d19481c8f2d1adc041645 (diff) | |
download | librpm-tizen-1fe38d71cc4049175b1a0ba7c493e20665880692.tar.gz librpm-tizen-1fe38d71cc4049175b1a0ba7c493e20665880692.tar.bz2 librpm-tizen-1fe38d71cc4049175b1a0ba7c493e20665880692.zip |
Use fdGetFILE() instead of rpmio internal fdGetFp() everywhere
-rw-r--r-- | build/build.c | 6 | ||||
-rw-r--r-- | build/files.c | 2 | ||||
-rw-r--r-- | build/pack.c | 3 | ||||
-rw-r--r-- | build/parseSpec.c | 4 | ||||
-rw-r--r-- | lib/manifest.c | 3 | ||||
-rw-r--r-- | python/rpmfd-py.c | 4 |
6 files changed, 8 insertions, 14 deletions
diff --git a/build/build.c b/build/build.c index 3d4c4c133..f6f9cf33d 100644 --- a/build/build.c +++ b/build/build.c @@ -5,7 +5,6 @@ #include "system.h" -#include "rpmio_internal.h" #include "rpmbuild.h" #include "rpmerr.h" #include "misc.h" /* XXX for makeTempFile */ @@ -135,13 +134,12 @@ int doScript(rpmSpec spec, rpmBuildFlags what, const char *name, StringBuf sb, i goto exit; } - if (fdGetFp(fd) == NULL) + if (fdGetFILE(fd) == NULL) xfd = Fdopen(fd, "w.fpio"); else xfd = fd; - /* FIX: cast? */ - if ((fp = fdGetFp(xfd)) == NULL) { + if ((fp = fdGetFILE(xfd)) == NULL) { rc = RPMERR_SCRIPT; goto exit; } diff --git a/build/files.c b/build/files.c index 0060763f8..2c60d94ae 100644 --- a/build/files.c +++ b/build/files.c @@ -1801,7 +1801,7 @@ static int processPackageFiles(rpmSpec spec, Package pkg, } ffn = _free(ffn); - f = fdGetFp(fd); + f = fdGetFILE(fd); if (f != NULL) while (fgets(buf, sizeof(buf), f)) { handleComments(buf); diff --git a/build/pack.c b/build/pack.c index b948f4d36..89fb07d93 100644 --- a/build/pack.c +++ b/build/pack.c @@ -129,8 +129,7 @@ static StringBuf addFileToTagAux(rpmSpec spec, sb = freeStringBuf(sb); return NULL; } - /* FIX: cast? */ - if ((f = fdGetFp(fd)) != NULL) + if ((f = fdGetFILE(fd)) != NULL) while (fgets(buf, sizeof(buf), f)) { /* XXX display fn in error msg */ if (expandMacros(spec, spec->macros, buf, sizeof(buf))) { diff --git a/build/parseSpec.c b/build/parseSpec.c index eeb1d6ee7..6d2fe9e0b 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -5,7 +5,6 @@ #include "system.h" -#include "rpmio_internal.h" #include "rpmbuild.h" #include "rpmds.h" #include "rpmts.h" @@ -230,8 +229,7 @@ retry: /* Make sure we have something in the read buffer */ if (!(ofi->readPtr && *(ofi->readPtr))) { - /* FIX: cast? */ - FILE * f = fdGetFp(ofi->fd); + FILE * f = fdGetFILE(ofi->fd); if (f == NULL || !fgets(ofi->readBuf, BUFSIZ, f)) { /* EOF */ if (spec->readStack->next) { diff --git a/lib/manifest.c b/lib/manifest.c index 4812e22d9..93bf4d0c8 100644 --- a/lib/manifest.c +++ b/lib/manifest.c @@ -4,7 +4,6 @@ #include "system.h" -#include "rpmio_internal.h" #include "rpmlib.h" #include "rpmmacro.h" @@ -69,7 +68,7 @@ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr) const char ** av = NULL; int argc = (argcPtr ? *argcPtr : 0); const char ** argv = (argvPtr ? *argvPtr : NULL); - FILE * f = (FILE *) fdGetFp(fd); + FILE * f = fdGetFILE(fd); rpmRC rpmrc = RPMRC_OK; int i, j, next, npre; diff --git a/python/rpmfd-py.c b/python/rpmfd-py.c index 30be42ff8..f03218f38 100644 --- a/python/rpmfd-py.c +++ b/python/rpmfd-py.c @@ -4,7 +4,7 @@ #include "system.h" -#include "rpmio_internal.h" /* XXX fdGetFp */ +#include "rpmio.h" /* XXX fdGetFILE */ #include "header-py.h" /* XXX pyrpmError */ #include "rpmfd-py.h" @@ -115,7 +115,7 @@ rpmfd_Fopen(PyObject * s, PyObject * args, PyObject * kwds) return NULL; } - node->f = fdGetFp(node->fd); + node->f = fdGetFILE(node->fd); if (!node->f) { PyErr_SetString(pyrpmError, "FD_t has no FILE*"); free(node); |