Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/lib/libuutil/common Cast int64_t to...



details:   https://anonhg.NetBSD.org/src/rev/15184196679a
branches:  trunk
changeset: 343870:15184196679a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Feb 29 16:14:57 2016 +0000

description:
Cast int64_t to long long before printfing with %lld.

Not doing so broke something months ago and I forgot why.

diffstat:

 external/cddl/osnet/dist/lib/libuutil/common/uu_open.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 5af017108c4a -r 15184196679a external/cddl/osnet/dist/lib/libuutil/common/uu_open.c
--- a/external/cddl/osnet/dist/lib/libuutil/common/uu_open.c    Mon Feb 29 15:28:35 2016 +0000
+++ b/external/cddl/osnet/dist/lib/libuutil/common/uu_open.c    Mon Feb 29 16:14:57 2016 +0000
@@ -53,7 +53,8 @@
                return (-1);
 
        for (;;) {
-               (void) snprintf(fname, PATH_MAX, "%s/uu%lld", dir, gethrtime());
+               (void) snprintf(fname, PATH_MAX, "%s/uu%lld", dir,
+                   (long long)gethrtime());
 
                f = open(fname, O_CREAT | O_EXCL | O_RDWR, 0600);
 



Home | Main Index | Thread Index | Old Index