[asterisk-commits] russell: trunk r252229 - /trunk/tests/test_time.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Mar 13 16:17:13 CST 2010


Author: russell
Date: Sat Mar 13 16:17:05 2010
New Revision: 252229

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=252229
Log:
Resolve compiler warning by paying attention to system() return value.

This resolves the last compile failure on bamboo.

Modified:
    trunk/tests/test_time.c

Modified: trunk/tests/test_time.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_time.c?view=diff&rev=252229&r1=252228&r2=252229
==============================================================================
--- trunk/tests/test_time.c (original)
+++ trunk/tests/test_time.c Sat Mar 13 16:17:05 2010
@@ -79,8 +79,11 @@
 	for (type = 0; type < 2; type++) {
 		ast_test_status_update(test, "Executing %s test...\n", type == 0 ? "deletion" : "symlink");
 		for (i = 0; i < ARRAY_LEN(zones); i++) {
+			int system_res;
 			snprintf(syscmd, sizeof(syscmd), "%s " TZDIR "/%s %s", type == 0 ? "cp" : "ln -sf", zones[i], tzfile);
-			system(syscmd);
+			if ((system_res = system(syscmd))) {
+				ast_log(LOG_WARNING, "system() returned non-zero: %d\n", system_res);
+			}
 			ast_localtime(&tv, &atm[i], tzfile);
 			if (i != 0) {
 				if (atm[i].tm_hour == atm[i - 1].tm_hour) {




More information about the asterisk-commits mailing list