summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cvs/src
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2013-12-14 13:40:40 +0000
committerjca <jca@openbsd.org>2013-12-14 13:40:40 +0000
commit4b3d160c306e2bd57aeb9cd9c25328d8f5b1976b (patch)
tree3e191a835d49415186990cc9274efe87b49ef350 /gnu/usr.bin/cvs/src
parentremove a duplicated includ file. (diff)
downloadwireguard-openbsd-4b3d160c306e2bd57aeb9cd9c25328d8f5b1976b.tar.xz
wireguard-openbsd-4b3d160c306e2bd57aeb9cd9c25328d8f5b1976b.zip
When writing a history entry, don't downcast time() return value to
(long). Use (long long) and print it with %ll08x instead. ok zhuk@
Diffstat (limited to 'gnu/usr.bin/cvs/src')
-rw-r--r--gnu/usr.bin/cvs/src/history.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/cvs/src/history.c b/gnu/usr.bin/cvs/src/history.c
index 106e987b2a2..d4becf3cecf 100644
--- a/gnu/usr.bin/cvs/src/history.c
+++ b/gnu/usr.bin/cvs/src/history.c
@@ -866,8 +866,8 @@ history_write (type, update_dir, revs, name, repository)
revs = "";
line = xmalloc (strlen (username) + strlen (workdir) + strlen (repos)
+ strlen (revs) + strlen (name) + 100);
- sprintf (line, "%c%08lx|%s|%s|%s|%s|%s\n",
- type, (long) time ((time_t *) NULL),
+ sprintf (line, "%c%08llx|%s|%s|%s|%s|%s\n",
+ type, (long long) time ((time_t *) NULL),
username, workdir, repos, revs, name);
/* Lessen some race conditions on non-Posix-compliant hosts. */