aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSeung-Woo Kim2018-01-09 20:16:41 -0600
committerEric Engestrom2018-01-25 04:39:30 -0600
commit6736ad45d88c4ce16c6f76fd128fae73b51ea2dc (patch)
treebad8b1e7e963575b0c5423d3aaa3691c491265ce /tests
parent1cc17744b988106b4fe71ee9d3d17b651d6adb40 (diff)
downloadexternal-libdrm-6736ad45d88c4ce16c6f76fd128fae73b51ea2dc.tar.gz
external-libdrm-6736ad45d88c4ce16c6f76fd128fae73b51ea2dc.tar.xz
external-libdrm-6736ad45d88c4ce16c6f76fd128fae73b51ea2dc.zip
modetest: Fix to check return value of asprintf()
There is warning about ignoring return value of 'asprintf'. Fix to check return value of asprintf(). Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/modetest/modetest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 62d93327..0773bd02 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -656,10 +656,13 @@ static struct resources *get_resources(struct device *dev)
656 for (i = 0; i < res->res->count_connectors; i++) { 656 for (i = 0; i < res->res->count_connectors; i++) {
657 struct connector *connector = &res->connectors[i]; 657 struct connector *connector = &res->connectors[i];
658 drmModeConnector *conn = connector->connector; 658 drmModeConnector *conn = connector->connector;
659 int num;
659 660
660 asprintf(&connector->name, "%s-%u", 661 num = asprintf(&connector->name, "%s-%u",
661 util_lookup_connector_type_name(conn->connector_type), 662 util_lookup_connector_type_name(conn->connector_type),
662 conn->connector_type_id); 663 conn->connector_type_id);
664 if (num < 0)
665 goto error;
663 } 666 }
664 667
665#define get_properties(_res, __res, type, Type) \ 668#define get_properties(_res, __res, type, Type) \