aboutsummaryrefslogtreecommitdiffstats
path: root/main/logger.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-23 00:11:32 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-23 00:11:32 +0000
commitcd15e6156e2c86dc13f28f31da59b58df7a1966e (patch)
tree2dedc24f8adfd522fcad82dd7e12e53bf19ff853 /main/logger.c
parent363b34c1e91602d96708183a0ac50874bac93c4b (diff)
Cosmetic changes. Make main source files better conform to coding guidelines and standards. (issue #8679 reported by johann8384)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51486 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/logger.c b/main/logger.c
index 3d9cb04a2..ed4d0729b 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -214,7 +214,7 @@ static struct logchannel *make_logchannel(char *channel, char *components, int l
* syslog.facility => level,level,level
*/
facility = strchr(channel, '.');
- if(!facility++ || !facility) {
+ if (!facility++ || !facility) {
facility = "local0";
}
@@ -283,14 +283,14 @@ static struct logchannel *make_logchannel(char *channel, char *components, int l
openlog("asterisk", LOG_PID, chan->facility);
} else {
if (channel[0] == '/') {
- if(!ast_strlen_zero(hostname)) {
+ if (!ast_strlen_zero(hostname)) {
snprintf(chan->filename, sizeof(chan->filename) - 1,"%s.%s", channel, hostname);
} else {
ast_copy_string(chan->filename, channel, sizeof(chan->filename));
}
}
- if(!ast_strlen_zero(hostname)) {
+ if (!ast_strlen_zero(hostname)) {
snprintf(chan->filename, sizeof(chan->filename), "%s/%s.%s", ast_config_AST_LOG_DIR, channel, hostname);
} else {
snprintf(chan->filename, sizeof(chan->filename), "%s/%s", ast_config_AST_LOG_DIR, channel);
@@ -523,7 +523,7 @@ int reload_logger(int rotate)
static int handle_logger_reload(int fd, int argc, char *argv[])
{
- if(reload_logger(0)) {
+ if (reload_logger(0)) {
ast_cli(fd, "Failed to reload the logger\n");
return RESULT_FAILURE;
} else
@@ -532,7 +532,7 @@ static int handle_logger_reload(int fd, int argc, char *argv[])
static int handle_logger_rotate(int fd, int argc, char *argv[])
{
- if(reload_logger(1)) {
+ if (reload_logger(1)) {
ast_cli(fd, "Failed to reload the logger and rotate log files\n");
return RESULT_FAILURE;
} else