From c71bb0fb39e47381caf49c50615da6bd5fcde619 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 13 Apr 2021 19:49:44 +0200 Subject: [PATCH] test: audio_time - fix timestamp2ns() and usage() BugLink: https://github.com/alsa-project/alsa-lib/issues/132 Signed-off-by: Jaroslav Kysela --- test/audio_time.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/audio_time.c b/test/audio_time.c index e4d4a944..919bebe3 100644 --- a/test/audio_time.c +++ b/test/audio_time.c @@ -19,7 +19,6 @@ #include #include "../include/asoundlib.h" -static char *command; static char *pcm_name = "hw:0"; snd_output_t *output = NULL; @@ -42,7 +41,7 @@ long long timestamp2ns(snd_htimestamp_t t) { long long nsec; - nsec = t.tv_sec * 1000000000; + nsec = t.tv_sec * 1000000000ULL; nsec += t.tv_nsec; return nsec; @@ -149,7 +148,7 @@ int main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) { switch (c) { case 'h': - usage(command); + usage(argv[0]); return 0; case 'p': do_playback = 1; -- 2.47.1