From 093c2263b1a8afb54c66a5608167f6bcff5bd778 Mon Sep 17 00:00:00 2001 From: Bogomil Vasilev Date: Tue, 9 Aug 2016 10:16:20 +0300 Subject: [PATCH] Syntax cleanup --- confparser.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/confparser.c b/confparser.c index 0483c13..4893434 100644 --- a/confparser.c +++ b/confparser.c @@ -278,30 +278,22 @@ static int test_conf_syntax() failed = 1; } else if (!strcmp(buf, "rmps.certfile")) { if (access(tmp + 1, F_OK) == -1) { - log_trace( ERROR, - "%s is missing", tmp + 1); + log_trace(ERROR, "%s is missing", tmp + 1); failed = 1; } else if (access(tmp + 1, R_OK) == -1) { - log_trace( ERROR, - "%s is not readable", - tmp + 1 - ); + log_trace(ERROR, "%s is not readable", tmp + 1); failed = 1; } else strncpy(conf.rmps.certfile, tmp + 1, sizeof(conf.rmps.certfile)); } else if (!strcmp(buf, "rmps.keyfile")) { if (access(tmp + 1, F_OK) == -1) { - log_trace( ERROR, - "%s is missing", conf.rmps.keyfile); + log_trace(ERROR, "%s is missing", conf.rmps.keyfile); failed = 1; } else if (access(tmp + 1, R_OK) == -1) { - log_trace( ERROR, - "%s is not readable", - tmp + 1 - ); + log_trace(ERROR, "%s is not readable", tmp + 1); failed = 1; } else strncpy(conf.rmps.keyfile, tmp + 1, sizeof(conf.rmps.keyfile)); @@ -309,26 +301,20 @@ static int test_conf_syntax() strncpy(conf.rmps.cipherlist, tmp + 1, sizeof(conf.rmps.cipherlist)); } else if (!strcmp(buf, "rmps.cafile")) { if (access(tmp + 1, F_OK) == -1) { - log_trace( ERROR, - "%s is missing", tmp + 1); + log_trace(ERROR, "%s is missing", tmp + 1); failed = 1; } else if (access(tmp + 1, R_OK) == -1) { - log_trace( ERROR, - "%s is not readable\n", - tmp + 1 - ); + log_trace(ERROR, "%s is not readable\n", tmp + 1); failed = 1; } else strncpy(conf.rmps.cafile, tmp + 1, sizeof(conf.rmps.cafile)); } else - log_trace( ERROR, - "Unknown config entry on line %d: %s", - j, buf ); + log_trace(ERROR, "Unknown config entry on line %d: %s", j, buf); if (!ok) { log_trace( ERROR, - "Invalid value for \"%s\", line %d: \"%s\"", - buf, j, tmp + 1 ); + "Invalid value for \"%s\", line %d: \"%s\"", + buf, j, tmp + 1 ); ok = !ok; } }