diff mbox

[8/8] fix warn in testdisplay: ignoring return value of 'chdir'

Message ID 1349874285-31536-9-git-send-email-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak Oct. 10, 2012, 1:04 p.m. UTC
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 tests/testdisplay.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 39c4265..cd83d9c 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -647,6 +647,7 @@  static void enter_exec_path( char **argv )
 	char *exec_path = NULL;
 	char *pos = NULL;
 	short len_path = 0;
+	int ret;
 
 	len_path = strlen( argv[0] );
 	exec_path = (char*) malloc(len_path);
@@ -656,7 +657,8 @@  static void enter_exec_path( char **argv )
 	if (pos != NULL)
 		*(pos+1) = '\0';
 
-	chdir(exec_path);
+	ret = chdir(exec_path);
+	assert(ret == 0);
 	free(exec_path);
 }