diff options
author | guenther <guenther@openbsd.org> | 2013-08-22 04:43:40 +0000 |
---|---|---|
committer | guenther <guenther@openbsd.org> | 2013-08-22 04:43:40 +0000 |
commit | 82ff36301fdb8c25511dd105cf211d26ea7f836e (patch) | |
tree | f17f8c8d35e761468f7997cee38d8a28bf837c8b /usr.sbin/ypserv/makedbm/makedbm.c | |
parent | Split out from kdump.c the ktrstruct.c bits into ktrstruct.c (diff) | |
download | wireguard-openbsd-82ff36301fdb8c25511dd105cf211d26ea7f836e.tar.xz wireguard-openbsd-82ff36301fdb8c25511dd105cf211d26ea7f836e.zip |
Correct format string mismatches turned up by -Wformat=2
suggestions and ok millert@
Diffstat (limited to 'usr.sbin/ypserv/makedbm/makedbm.c')
-rw-r--r-- | usr.sbin/ypserv/makedbm/makedbm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/makedbm/makedbm.c b/usr.sbin/ypserv/makedbm/makedbm.c index f819b752efa..9a1a7881dcc 100644 --- a/usr.sbin/ypserv/makedbm/makedbm.c +++ b/usr.sbin/ypserv/makedbm/makedbm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makedbm.c,v 1.29 2009/10/27 23:59:57 deraadt Exp $ */ +/* $OpenBSD: makedbm.c,v 1.30 2013/08/22 04:43:41 guenther Exp $ */ /* * Copyright (c) 1994-97 Mats O Jansson <moj@stacken.kth.se> @@ -111,14 +111,16 @@ file_date(char *filename) int status; if (strcmp(filename,"-") == 0) { - snprintf(datestr, sizeof datestr, "%010u", time(0)); + snprintf(datestr, sizeof datestr, "%010lld", + (long long)time(0)); } else { status = stat(filename, &finfo); if (status < 0) { fprintf(stderr, "%s: can't stat %s\n", __progname, filename); exit(1); } - snprintf(datestr, sizeof datestr, "%010u", finfo.st_mtime); + snprintf(datestr, sizeof datestr, "%010lld", + (long long)finfo.st_mtime); } return datestr; } |