diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2013-12-14 13:40:41 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2013-12-14 13:40:41 +0000 |
commit | d3f3383f267486047021737c2b9fb4f0d701bfd6 (patch) | |
tree | 168fd9e872080bf14ba21ba43c295095423dc98b /gnu/usr.bin | |
parent | f00b72002d3c779eb0817e266e969489b2c1ae63 (diff) |
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')
-rw-r--r-- | gnu/usr.bin/cvs/src/history.c | 4 |
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. */ |