Skip to content

Commit 211c137

Browse files
committed
fix formatting
1 parent 5330b97 commit 211c137

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/metalog.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static int parseLine(char * const line, ConfigBlock **cur_block,
220220
else
221221
free(logdir);
222222
new_output->fp = NULL;
223-
new_output->perms = (*cur_block)->perms;
223+
new_output->perms = (*cur_block)->perms;
224224
new_output->size = (off_t) 0;
225225
new_output->maxsize = (*cur_block)->maxsize;
226226
new_output->maxfiles = (*cur_block)->maxfiles;
@@ -359,7 +359,7 @@ static int configParser(const char * const file)
359359
(off_t) DEFAULT_MAXSIZE, /* maxsize */
360360
DEFAULT_MAXFILES, /* maxfiles */
361361
(time_t) DEFAULT_MAXTIME, /* maxtime */
362-
(mode_t) DEFAULT_PERMS, /* perms */
362+
(mode_t) DEFAULT_PERMS, /* perms */
363363
NULL, /* output */
364364
NULL, /* command */
365365
NULL, /* program */
@@ -1647,17 +1647,17 @@ static void dodaemonize(void)
16471647

16481648
static void setgroup(void)
16491649
{
1650-
if (group_name == NULL) return;
1651-
struct group *g;
1652-
errno = 0;
1653-
if ((g = getgrnam(group_name)) == NULL) {
1654-
if(errno == 0)
1655-
err("Failed to set group: group '%s' not found", group_name);
1656-
else
1657-
errp("Failed to set group");
1658-
}
1659-
if (setgid(g->gr_gid) == -1)
1660-
errp("Failed to set group");
1650+
if (group_name == NULL) return;
1651+
struct group *g;
1652+
errno = 0;
1653+
if ((g = getgrnam(group_name)) == NULL) {
1654+
if(errno == 0)
1655+
err("Failed to set group: group '%s' not found", group_name);
1656+
else
1657+
errp("Failed to set group");
1658+
}
1659+
if (setgid(g->gr_gid) == -1)
1660+
errp("Failed to set group");
16611661
}
16621662

16631663
__attribute__ ((noreturn))
@@ -1700,9 +1700,9 @@ static void parseOptions(int argc, char *argv[])
17001700
case 'C' :
17011701
config_file = xstrdup(optarg);
17021702
break;
1703-
case 'g' :
1704-
group_name = xstrdup(optarg);
1705-
break;
1703+
case 'g' :
1704+
group_name = xstrdup(optarg);
1705+
break;
17061706
case 'v' :
17071707
++verbose;
17081708
break;

0 commit comments

Comments
 (0)