summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-01-02 17:02:06 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-01-02 17:02:06 +0200
commit68e1d60be3e53c51d142dfca7b7a1501e867b681 (patch)
tree2757f53a27cb05026e9862033bfbc5d56006d58a /lib
parentbb70bbb7734a2a069bf97b08a354e04fb3debfdf (diff)
downloadrpm-68e1d60be3e53c51d142dfca7b7a1501e867b681.tar.gz
rpm-68e1d60be3e53c51d142dfca7b7a1501e867b681.tar.bz2
rpm-68e1d60be3e53c51d142dfca7b7a1501e867b681.zip
Signedness consistency in rpmfi interface vs internal structures
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmfi.c34
-rw-r--r--lib/rpmfi.h14
2 files changed, 24 insertions, 24 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index 0201502bb..e0f21977f 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -134,7 +134,7 @@ const char * rpmfiFN(rpmfi fi)
uint32_t rpmfiFFlags(rpmfi fi)
{
- int32_t FFlags = 0;
+ uint32_t FFlags = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fflags != NULL)
@@ -145,7 +145,7 @@ uint32_t rpmfiFFlags(rpmfi fi)
uint32_t rpmfiVFlags(rpmfi fi)
{
- int32_t VFlags = 0;
+ uint32_t VFlags = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->vflags != NULL)
@@ -154,9 +154,9 @@ uint32_t rpmfiVFlags(rpmfi fi)
return VFlags;
}
-int16_t rpmfiFMode(rpmfi fi)
+uint16_t rpmfiFMode(rpmfi fi)
{
- int16_t fmode = 0;
+ uint16_t fmode = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fmodes != NULL)
@@ -198,9 +198,9 @@ const char * rpmfiFLink(rpmfi fi)
return flink;
}
-int32_t rpmfiFSize(rpmfi fi)
+uint32_t rpmfiFSize(rpmfi fi)
{
- int32_t fsize = 0;
+ uint32_t fsize = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fsizes != NULL)
@@ -209,9 +209,9 @@ int32_t rpmfiFSize(rpmfi fi)
return fsize;
}
-int16_t rpmfiFRdev(rpmfi fi)
+uint16_t rpmfiFRdev(rpmfi fi)
{
- int16_t frdev = 0;
+ uint16_t frdev = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->frdevs != NULL)
@@ -220,9 +220,9 @@ int16_t rpmfiFRdev(rpmfi fi)
return frdev;
}
-int32_t rpmfiFInode(rpmfi fi)
+uint32_t rpmfiFInode(rpmfi fi)
{
- int32_t finode = 0;
+ uint32_t finode = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->finodes != NULL)
@@ -277,7 +277,7 @@ const char * rpmfiFContext(rpmfi fi)
return fcontext;
}
-int32_t rpmfiFDepends(rpmfi fi, const uint32_t ** fddictp)
+uint32_t rpmfiFDepends(rpmfi fi, const uint32_t ** fddictp)
{
int fddictx = -1;
int fddictn = 0;
@@ -296,15 +296,15 @@ int32_t rpmfiFDepends(rpmfi fi, const uint32_t ** fddictp)
return fddictn;
}
-int32_t rpmfiFNlink(rpmfi fi)
+uint32_t rpmfiFNlink(rpmfi fi)
{
- int32_t nlink = 0;
+ uint32_t nlink = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
/* XXX rpm-2.3.12 has not RPMTAG_FILEINODES */
if (fi->finodes && fi->frdevs) {
- int32_t finode = fi->finodes[fi->i];
- int16_t frdev = fi->frdevs[fi->i];
+ uint32_t finode = fi->finodes[fi->i];
+ uint16_t frdev = fi->frdevs[fi->i];
int j;
for (j = 0; j < fi->fc; j++) {
@@ -316,9 +316,9 @@ int32_t rpmfiFNlink(rpmfi fi)
return nlink;
}
-int32_t rpmfiFMtime(rpmfi fi)
+uint32_t rpmfiFMtime(rpmfi fi)
{
- int32_t fmtime = 0;
+ uint32_t fmtime = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fmtimes != NULL)
diff --git a/lib/rpmfi.h b/lib/rpmfi.h
index c5df627c9..2357eee12 100644
--- a/lib/rpmfi.h
+++ b/lib/rpmfi.h
@@ -187,7 +187,7 @@ uint32_t rpmfiVFlags(rpmfi fi);
* @param fi file info set
* @return current file mode, 0 on invalid
*/
-int16_t rpmfiFMode(rpmfi fi);
+uint16_t rpmfiFMode(rpmfi fi);
/** \ingroup rpmfi
* Return current file state from file info set.
@@ -215,21 +215,21 @@ extern const char * rpmfiFLink(rpmfi fi);
* @param fi file info set
* @return current file size, 0 on invalid
*/
-int32_t rpmfiFSize(rpmfi fi);
+uint32_t rpmfiFSize(rpmfi fi);
/** \ingroup rpmfi
* Return current file rdev from file info set.
* @param fi file info set
* @return current file rdev, 0 on invalid
*/
-int16_t rpmfiFRdev(rpmfi fi);
+uint16_t rpmfiFRdev(rpmfi fi);
/** \ingroup rpmfi
* Return current file inode from file info set.
* @param fi file info set
* @return current file inode, 0 on invalid
*/
-int32_t rpmfiFInode(rpmfi fi);
+uint32_t rpmfiFInode(rpmfi fi);
/** \ingroup rpmfi
* Return union of all file color bits from file info set.
@@ -265,7 +265,7 @@ extern const char * rpmfiFContext(rpmfi fi);
* @retval *fddictp file depends dictionary array (or NULL)
* @return no. of file depends entries, 0 on invalid
*/
-int32_t rpmfiFDepends(rpmfi fi,
+uint32_t rpmfiFDepends(rpmfi fi,
const uint32_t ** fddictp);
/** \ingroup rpmfi
@@ -273,14 +273,14 @@ int32_t rpmfiFDepends(rpmfi fi,
* @param fi file info set
* @return current file nlink count, 0 on invalid
*/
-int32_t rpmfiFNlink(rpmfi fi);
+uint32_t rpmfiFNlink(rpmfi fi);
/** \ingroup rpmfi
* Return current file modify time from file info set.
* @param fi file info set
* @return current file modify time, 0 on invalid
*/
-int32_t rpmfiFMtime(rpmfi fi);
+uint32_t rpmfiFMtime(rpmfi fi);
/** \ingroup rpmfi
* Return current file owner from file info set.