arb_query_buffer_object: Silence Coverity unchecked return value defect.

Submitted by Vinson Lee on July 1, 2016, 9:39 p.m.

Details

Message ID 1467409181-28742-1-git-send-email-vlee@freedesktop.org
State New
Headers show
Series "arb_query_buffer_object: Silence Coverity unchecked return value defect." ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Vinson Lee July 1, 2016, 9:39 p.m.
CID: 1361479
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
---
 tests/spec/arb_query_buffer_object/qbo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_query_buffer_object/qbo.c b/tests/spec/arb_query_buffer_object/qbo.c
index 1bcbe1035fad..c00b53475383 100644
--- a/tests/spec/arb_query_buffer_object/qbo.c
+++ b/tests/spec/arb_query_buffer_object/qbo.c
@@ -263,9 +263,9 @@  run_subtest_and_present(void)
 	char *subtest_name;
 	enum piglit_result r = run_subtest();
 	piglit_present_results();
-	asprintf(&subtest_name, "query-%s-%s",
-		 piglit_get_gl_enum_name(query_type),
-		 sync_mode_names[sync_mode]);
+	(void)!asprintf(&subtest_name, "query-%s-%s",
+			piglit_get_gl_enum_name(query_type),
+			sync_mode_names[sync_mode]);
 	piglit_report_subtest_result(r, "%s", subtest_name);
 	free(subtest_name);
 	return r;

Comments

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

On 2016-07-01 14:39:41, Vinson Lee wrote:
> CID: 1361479
> Signed-off-by: Vinson Lee <vlee@freedesktop.org>
> ---
>  tests/spec/arb_query_buffer_object/qbo.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/spec/arb_query_buffer_object/qbo.c b/tests/spec/arb_query_buffer_object/qbo.c
> index 1bcbe1035fad..c00b53475383 100644
> --- a/tests/spec/arb_query_buffer_object/qbo.c
> +++ b/tests/spec/arb_query_buffer_object/qbo.c
> @@ -263,9 +263,9 @@ run_subtest_and_present(void)
>         char *subtest_name;
>         enum piglit_result r = run_subtest();
>         piglit_present_results();
> -       asprintf(&subtest_name, "query-%s-%s",
> -                piglit_get_gl_enum_name(query_type),
> -                sync_mode_names[sync_mode]);
> +       (void)!asprintf(&subtest_name, "query-%s-%s",
> +                       piglit_get_gl_enum_name(query_type),
> +                       sync_mode_names[sync_mode]);
>         piglit_report_subtest_result(r, "%s", subtest_name);
>         free(subtest_name);
>         return r;
> -- 
> 2.7.4
>