From 4a40d6b3687d6562a0837e691dc650177899a14e Mon Sep 17 00:00:00 2001 From: ewt Date: Wed, 27 Dec 1995 20:52:58 +0000 Subject: [PATCH] removed ntohl() weirdness - header.c works better now CVS patchset: 112 CVS date: 1995/12/27 20:52:58 --- query.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/query.c b/query.c index 0dcd8e9..61a5777 100644 --- a/query.c +++ b/query.c @@ -14,7 +14,6 @@ void printHeader(Header h, int queryFlags) { uint_32 * size; int_32 count, type; int_32 * pBuildDate; - int_32 buildDate; char * prefix = NULL; char buildDateStr[100]; struct tm * tstruct; @@ -41,8 +40,7 @@ void printHeader(Header h, int queryFlags) { getEntry(h, RPMTAG_SIZE, &type, (void **) &size, &count); getEntry(h, RPMTAG_BUILDTIME, &type, (void **) &pBuildDate, &count); - buildDate = ntohl(*pBuildDate); - tstruct = localtime((time_t *) &buildDate); + tstruct = localtime(&pBuildDate); strftime(buildDateStr, sizeof(buildDateStr) - 1, "%c", tstruct); printf("Name : %-27s Distribution: %s\n", @@ -51,7 +49,7 @@ void printHeader(Header h, int queryFlags) { printf("Release : %-27s Build Date: %s\n", release, buildDateStr); printf("Install date: %-27s Build Host: %s\n", "", buildHost); printf("Group : %s\n", group); - printf("Size : %d\n", ntohl(*size)); + printf("Size : %d\n", *size); printf("Description : %s\n", description); prefix = " "; } @@ -64,8 +62,6 @@ void printHeader(Header h, int queryFlags) { (void **) &fileFlagsList, &count); for (i = 0; i < count; i++) { - fileFlagsList[i] = ntohl(fileFlagsList[i]); - if (!((queryFlags & QUERY_FOR_DOCS) || (queryFlags & QUERY_FOR_CONFIG)) || ((queryFlags & QUERY_FOR_DOCS) && -- 2.7.4