diff options
author | Frederic Berat <fberat@redhat.com> | 2023-06-20 20:19:09 +0200 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2023-06-22 00:21:19 -0400 |
commit | 99f9ae4ed0ba9f2c84520b78fd0eeed96a7ed40e (patch) | |
tree | 67e9fcae91c38999b9694ce136570188564c9398 /benchtests | |
parent | d636339306d19beb486d6f3a0b364db845baf4e0 (diff) | |
download | glibc-99f9ae4ed0ba9f2c84520b78fd0eeed96a7ed40e.tar.gz glibc-99f9ae4ed0ba9f2c84520b78fd0eeed96a7ed40e.tar.xz glibc-99f9ae4ed0ba9f2c84520b78fd0eeed96a7ed40e.zip |
benchtests: fix warn unused result
Few tests needed to properly check for asprintf and system calls return values with _FORTIFY_SOURCE enabled. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'benchtests')
-rw-r--r-- | benchtests/bench-strcoll.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/benchtests/bench-strcoll.c b/benchtests/bench-strcoll.c index b3cd5ce8a9..0bd9ada5f6 100644 --- a/benchtests/bench-strcoll.c +++ b/benchtests/bench-strcoll.c @@ -254,7 +254,11 @@ main (void) } char *filename; - asprintf (&filename, INPUT_PREFIX "%s", input_files[i]); + if (asprintf (&filename, INPUT_PREFIX "%s", input_files[i]) < 0) + { + printf ("asprintf failed, aborting!\n"); + return ERROR_FILENAME; + } result = bench_file (json_ctx, input_files[i], filename, locale + 1); if (result != OK) |