diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-01 17:01:29 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-09 17:53:23 +0200 |
commit | 759b204be33fa8485c9e28038ee029a49e2e9d3f (patch) | |
tree | c590185bee7022f9bc3944314f578ce141f0fa32 /sysdep/unix/main.c | |
parent | cc95b4594ac924b40325a4f1adcae5312179db40 (diff) |
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.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r-- | sysdep/unix/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |