diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/file/file.h | 6 | ||||
-rw-r--r-- | usr.bin/file/print.c | 8 | ||||
-rw-r--r-- | usr.bin/file/softmagic.c | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/file/file.h b/usr.bin/file/file.h index dd191bad58e..40d296ba62d 100644 --- a/usr.bin/file/file.h +++ b/usr.bin/file/file.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file.h,v 1.22 2009/10/27 23:59:37 deraadt Exp $ */ +/* $OpenBSD: file.h,v 1.23 2013/04/17 15:01:26 deraadt Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -28,7 +28,7 @@ */ /* * file.h - definitions for file(1) program - * @(#)$Id: file.h,v 1.22 2009/10/27 23:59:37 deraadt Exp $ + * @(#)$Id: file.h,v 1.23 2013/04/17 15:01:26 deraadt Exp $ */ #ifndef __file_h__ @@ -319,7 +319,7 @@ struct magic_set { typedef unsigned long unichar; struct stat; -protected const char *file_fmttime(uint32_t, int); +protected const char *file_fmttime(uint64_t, int); protected int file_buffer(struct magic_set *, int, const char *, const void *, size_t); protected int file_fsmagic(struct magic_set *, const char *, struct stat *); diff --git a/usr.bin/file/print.c b/usr.bin/file/print.c index cfcddaee99e..8b5b5d63b90 100644 --- a/usr.bin/file/print.c +++ b/usr.bin/file/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.16 2009/10/27 23:59:37 deraadt Exp $ */ +/* $OpenBSD: print.c,v 1.17 2013/04/17 15:01:26 deraadt Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -146,13 +146,13 @@ file_mdump(struct magic *m) case FILE_LEQDATE: case FILE_BEQDATE: (void)fprintf(stderr, "%s,", - file_fmttime((uint32_t)m->value.q, 1)); + file_fmttime(m->value.q, 1)); break; case FILE_QLDATE: case FILE_LEQLDATE: case FILE_BEQLDATE: (void)fprintf(stderr, "%s,", - file_fmttime((uint32_t)m->value.q, 0)); + file_fmttime(m->value.q, 0)); break; case FILE_FLOAT: case FILE_BEFLOAT: @@ -196,7 +196,7 @@ file_magwarn(struct magic_set *ms, const char *f, ...) } protected const char * -file_fmttime(uint32_t v, int local) +file_fmttime(uint64_t v, int local) { char *pp; time_t t = (time_t)v; diff --git a/usr.bin/file/softmagic.c b/usr.bin/file/softmagic.c index cc496d17680..6aa16d2725f 100644 --- a/usr.bin/file/softmagic.c +++ b/usr.bin/file/softmagic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softmagic.c,v 1.16 2010/01/17 20:36:21 chl Exp $ */ +/* $OpenBSD: softmagic.c,v 1.17 2013/04/17 15:01:26 deraadt Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -425,7 +425,7 @@ mprint(struct magic_set *ms, struct magic *m) case FILE_MEDATE: if (file_printf(ms, MAGIC_DESC, file_fmttime(p->l, 1)) == -1) return -1; - t = ms->offset + sizeof(time_t); + t = ms->offset + sizeof(int32_t); break; case FILE_LDATE: @@ -434,13 +434,13 @@ mprint(struct magic_set *ms, struct magic *m) case FILE_MELDATE: if (file_printf(ms, MAGIC_DESC, file_fmttime(p->l, 0)) == -1) return -1; - t = ms->offset + sizeof(time_t); + t = ms->offset + sizeof(int32_t); break; case FILE_QDATE: case FILE_BEQDATE: case FILE_LEQDATE: - if (file_printf(ms, MAGIC_DESC, file_fmttime((uint32_t)p->q, 1)) + if (file_printf(ms, MAGIC_DESC, file_fmttime(p->q, 1)) == -1) return -1; t = ms->offset + sizeof(uint64_t); @@ -449,7 +449,7 @@ mprint(struct magic_set *ms, struct magic *m) case FILE_QLDATE: case FILE_BEQLDATE: case FILE_LEQLDATE: - if (file_printf(ms, MAGIC_DESC, file_fmttime((uint32_t)p->q, 0)) + if (file_printf(ms, MAGIC_DESC, file_fmttime(p->q, 0)) == -1) return -1; t = ms->offset + sizeof(uint64_t); |