From 759b204be33fa8485c9e28038ee029a49e2e9d3f Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 1 Oct 2019 17:01:29 +0200 Subject: Lib: Support for 64-bit numbers in bvsnprintf() Use 'l' for s64/u64 instead of for long/ulong, as that is much more useful. Also make number() correct with regard to signed/unsigned typecasts. --- sysdep/unix/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdep') diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index a52ae3ca..282afae2 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -533,7 +533,7 @@ write_pid_file(void) /* We don't use PID file for uniqueness, so no need for locking */ - pl = bsnprintf(ps, sizeof(ps), "%ld\n", (long) getpid()); + pl = bsnprintf(ps, sizeof(ps), "%ld\n", (s64) getpid()); if (pl < 0) bug("PID buffer too small"); -- cgit v1.2.3