Cosmetic changes. Make main source files better conform to coding guidelines and standards. (issue #8679 reported by johann8384)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-01-23 00:11:32 +00:00
parent dcdc6c0bc6
commit 21b53af31d
23 changed files with 175 additions and 181 deletions

View File

@@ -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