diff options
author | taesub kim <taesub.kim@samsung.com> | 2017-10-16 08:02:08 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2017-10-16 08:02:08 +0000 |
commit | 8ebd8f3ecaf041675e8e104f64ba75c2e0068873 (patch) | |
tree | 18ffb8b00e185a212e71209f9739af88adaff0c3 | |
parent | 6cdb0201e472a79ddb01ba1d78e327f08b46415a (diff) | |
parent | a711ff292b5f32788175bf64656f6a6d14c5f372 (diff) | |
download | connman-8ebd8f3ecaf041675e8e104f64ba75c2e0068873.tar.gz connman-8ebd8f3ecaf041675e8e104f64ba75c2e0068873.tar.bz2 connman-8ebd8f3ecaf041675e8e104f64ba75c2e0068873.zip |
Merge "Fix SVACE issue for CID:24236, 31182" into tizensubmit/tizen/20171016.080431
-rwxr-xr-x | src/log.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -77,13 +77,15 @@ static void __connman_log_update_file_revision(int rev) next_log_file = g_strdup_printf("%s.%d", LOG_FILE_PATH, next_log_rev); if (next_log_rev >= MAX_LOG_COUNT) - remove(next_log_file); + if (remove(next_log_file) != 0) + __connman_log_s(LOG_INFO, "error: remove failed for %s", next_log_file); if (access(next_log_file, F_OK) == 0) __connman_log_update_file_revision(next_log_rev); if (rename(log_file, next_log_file) != 0) - remove(log_file); + if (remove(log_file) != 0) + __connman_log_s(LOG_INFO, "error: remove failed for %s", log_file); g_free(log_file); g_free(next_log_file); @@ -100,7 +102,8 @@ static void __connman_log_make_backup(void) __connman_log_update_file_revision(rev); if (rename(LOG_FILE_PATH, backup) != 0) - remove(LOG_FILE_PATH); + if (remove(LOG_FILE_PATH) != 0) + __connman_log_s(LOG_INFO, "error: remove failed for %s", LOG_FILE_PATH); g_free(backup); } |