[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] poke: Use portable format specifier for int64_t
From: |
Mohammad-Reza Nabipoor |
Subject: |
[PATCH 2/2] poke: Use portable format specifier for int64_t |
Date: |
Mon, 24 Jan 2022 21:32:50 +0330 |
2022-01-24 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
* poke/pk-cmd-set.c (pk_cmd_set): Use `PRId64` instead of `ld`.
---
ChangeLog | 4 ++++
poke/pk-cmd-set.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index a79a1b00..a60afde2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-01-24 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
+
+ * poke/pk-cmd-set.c (pk_cmd_set): Use `PRId64` instead of `ld`.
+
2022-01-24 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
* poke/pk-cmd-def.c (PREP_REGEXP_PAYLOAD): Compare the string pointer
diff --git a/poke/pk-cmd-set.c b/poke/pk-cmd-set.c
index 1605ee7a..242d113f 100644
--- a/poke/pk-cmd-set.c
+++ b/poke/pk-cmd-set.c
@@ -20,6 +20,7 @@
#include <assert.h>
#include <string.h>
#include <stdlib.h>
+#include <inttypes.h>
#include "xalloc.h"
#include "poke.h"
@@ -83,7 +84,7 @@ pk_cmd_set (int int_p,
assert (0);
if (int_p)
- pk_printf ("%ld\n", pk_int_value (retval));
+ pk_printf ("%" PRId64 "\n", pk_int_value (retval));
else
pk_printf ("%s\n", pk_string_str (retval));
}
--
2.34.1