diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-09 19:10:49 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-09 19:10:49 +0100 |
commit | dc698bb038756a926aaa529bda1b939eab2c1676 (patch) | |
tree | 4084a40897d9d81816228935a1398e80dd4b173b /archival/rpm.c | |
parent | 0681137972dc89b5003b0415e09184c0ecf1c875 (diff) | |
download | busybox-w32-dc698bb038756a926aaa529bda1b939eab2c1676.tar.gz busybox-w32-dc698bb038756a926aaa529bda1b939eab2c1676.tar.bz2 busybox-w32-dc698bb038756a926aaa529bda1b939eab2c1676.zip |
*: make it easier to distinquish "struct tm", pointer to one, etc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/rpm.c')
-rw-r--r-- | archival/rpm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/archival/rpm.c b/archival/rpm.c index cdaf50fa9..6c1e341cd 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
@@ -145,13 +145,13 @@ int rpm_main(int argc, char **argv) | |||
145 | if (func & rpm_query_info) { | 145 | if (func & rpm_query_info) { |
146 | /* Do the nice printout */ | 146 | /* Do the nice printout */ |
147 | time_t bdate_time; | 147 | time_t bdate_time; |
148 | struct tm *bdate; | 148 | struct tm *bdate_ptm; |
149 | char bdatestring[50]; | 149 | char bdatestring[50]; |
150 | printf("Name : %-29sRelocations: %s\n", rpm_getstr(TAG_NAME, 0), rpm_getstr(TAG_PREFIXS, 0) ? rpm_getstr(TAG_PREFIXS, 0) : "(not relocateable)"); | 150 | printf("Name : %-29sRelocations: %s\n", rpm_getstr(TAG_NAME, 0), rpm_getstr(TAG_PREFIXS, 0) ? rpm_getstr(TAG_PREFIXS, 0) : "(not relocateable)"); |
151 | printf("Version : %-34sVendor: %s\n", rpm_getstr(TAG_VERSION, 0), rpm_getstr(TAG_VENDOR, 0) ? rpm_getstr(TAG_VENDOR, 0) : "(none)"); | 151 | printf("Version : %-34sVendor: %s\n", rpm_getstr(TAG_VERSION, 0), rpm_getstr(TAG_VENDOR, 0) ? rpm_getstr(TAG_VENDOR, 0) : "(none)"); |
152 | bdate_time = rpm_getint(TAG_BUILDTIME, 0); | 152 | bdate_time = rpm_getint(TAG_BUILDTIME, 0); |
153 | bdate = localtime((time_t *) &bdate_time); | 153 | bdate_ptm = localtime(&bdate_time); |
154 | strftime(bdatestring, 50, "%a %d %b %Y %T %Z", bdate); | 154 | strftime(bdatestring, 50, "%a %d %b %Y %T %Z", bdate_ptm); |
155 | printf("Release : %-30sBuild Date: %s\n", rpm_getstr(TAG_RELEASE, 0), bdatestring); | 155 | printf("Release : %-30sBuild Date: %s\n", rpm_getstr(TAG_RELEASE, 0), bdatestring); |
156 | printf("Install date: %-30sBuild Host: %s\n", "(not installed)", rpm_getstr(TAG_BUILDHOST, 0)); | 156 | printf("Install date: %-30sBuild Host: %s\n", "(not installed)", rpm_getstr(TAG_BUILDHOST, 0)); |
157 | printf("Group : %-30sSource RPM: %s\n", rpm_getstr(TAG_GROUP, 0), rpm_getstr(TAG_SOURCERPM, 0)); | 157 | printf("Group : %-30sSource RPM: %s\n", rpm_getstr(TAG_GROUP, 0), rpm_getstr(TAG_SOURCERPM, 0)); |