[ovs-dev] [PATCH] ovs-numa: Correct printf format specifiers.

Alex Wang alexw at nicira.com
Wed Aug 13 21:20:36 UTC 2014


Thx for the fix, Acked-by: Alex Wang <alexw at nicira.com>


On Wed, Aug 13, 2014 at 2:19 PM, Ben Pfaff <blp at nicira.com> wrote:

> list_size() yields a size_t, not uint64_t, and these types are different on
> 32-bit targets.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  lib/ovs-numa.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/ovs-numa.c b/lib/ovs-numa.c
> index bcf9b68..44df40f 100644
> --- a/lib/ovs-numa.c
> +++ b/lib/ovs-numa.c
> @@ -107,7 +107,7 @@ discover_sockets_and_cores(void)
>                      n_cpus++;
>                  }
>              }
> -            VLOG_INFO("Discovered %"PRIu64" CPU cores on CPU socket %d",
> +            VLOG_INFO("Discovered %"PRIuSIZE" CPU cores on CPU socket %d",
>                        list_size(&s->cores), s->socket_id);
>              free(path);
>              closedir(dir);
> @@ -121,7 +121,7 @@ discover_sockets_and_cores(void)
>          }
>      }
>
> -    VLOG_INFO("Discovered %"PRIu64" CPU Sockets and %d CPU cores",
> +    VLOG_INFO("Discovered %"PRIuSIZE" CPU Sockets and %d CPU cores",
>                 hmap_count(&all_cpu_sockets), n_cpus);
>      if (hmap_count(&all_cpu_sockets) && hmap_count(&all_cpu_cores)) {
>          found_sockets_and_cores = true;
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list