perf probe-event: Un-hardcode sizeof(buf)
authorDima Kogan <dima@secretsauce.net>
Tue, 16 Apr 2024 04:55:10 +0000 (21:55 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 19 Apr 2024 01:22:51 +0000 (22:22 -0300)
commita529bec023d7d14d9fb7d5b456921630e63edc6b
tree4e5a41d8b686df80fcf93423cfe395a0684418f4
parent03f2357017c37d68e73d7d8d77abfcb72e12bc86
perf probe-event: Un-hardcode sizeof(buf)

In several places we had

  char buf[64];
  ...
  snprintf(buf, 64, ...);

This patch changes it to

  char buf[64];
  ...
  snprintf(buf, sizeof(buf), ...);

so the "64" is only stated once.

Signed-off-by: Dima Kogan <dima@secretsauce.net>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20240416045533.162692-2-dima@secretsauce.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c