diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-03-13 22:17:05 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-03-13 22:17:05 +0000 |
commit | be31fb34f7164d84a0b5a89243623e652078c7f2 (patch) | |
tree | 3669f3ede515476d803d4a15c77aa8aa74d3b6cf /tests | |
parent | 18c935c6944a5f374a59367607669da45221d8d1 (diff) |
Resolve compiler warning by paying attention to system() return value.
This resolves the last compile failure on bamboo.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252229 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_time.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_time.c b/tests/test_time.c index 3dfb5d86b..58b7af356 100644 --- a/tests/test_time.c +++ b/tests/test_time.c @@ -79,8 +79,11 @@ AST_TEST_DEFINE(test_timezone_watch) 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) { |