poke-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] poke: Use portable format specifier for int64_t


From: Jose E. Marchesi
Subject: Re: [PATCH 2/2] poke: Use portable format specifier for int64_t
Date: Mon, 24 Jan 2022 19:53:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Mohammad.

OK for both master and maint/poke-2.
Thanks!

> 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));
>      }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]