summaryrefslogtreecommitdiff
path: root/query.c
diff options
context:
space:
mode:
authorewt <devnull@localhost>1995-12-27 20:52:58 +0000
committerewt <devnull@localhost>1995-12-27 20:52:58 +0000
commit4a40d6b3687d6562a0837e691dc650177899a14e (patch)
treec1c098e9325f5a224747dae1a0885038e89c155b /query.c
parent5939edd578ac857eba5dc45402208e2ceddaf46a (diff)
downloadrpm-4a40d6b3687d6562a0837e691dc650177899a14e.tar.gz
rpm-4a40d6b3687d6562a0837e691dc650177899a14e.tar.bz2
rpm-4a40d6b3687d6562a0837e691dc650177899a14e.zip
removed ntohl() weirdness - header.c works better now
CVS patchset: 112 CVS date: 1995/12/27 20:52:58
Diffstat (limited to 'query.c')
-rw-r--r--query.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/query.c b/query.c
index 0dcd8e9a4..61a577752 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) &&