Skip to content

Commit 9bc857f

Browse files
soffchenpymumu
authored andcommitted
smartdns: fix typo
1 parent 8523f26 commit 9bc857f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/smartdns.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static void _help(void)
138138
char *help = ""
139139
"Usage: smartdns [OPTION]...\n"
140140
"Start smartdns server.\n"
141-
" -f run forground.\n"
141+
" -f run foreground.\n"
142142
" -c [conf] config file.\n"
143143
" -p [pid] pid file path, '-' means don't create pid file.\n"
144144
" -S ignore segment fault signal.\n"
@@ -518,7 +518,7 @@ static int _smartdns_init_pre(void)
518518
int main(int argc, char *argv[])
519519
{
520520
int ret = 0;
521-
int is_forground = 0;
521+
int is_foreground = 0;
522522
int opt = 0;
523523
char config_file[MAX_LINE_LEN];
524524
char pid_file[MAX_LINE_LEN];
@@ -535,7 +535,7 @@ int main(int argc, char *argv[])
535535
while ((opt = getopt(argc, argv, "fhc:p:SvxN:")) != -1) {
536536
switch (opt) {
537537
case 'f':
538-
is_forground = 1;
538+
is_foreground = 1;
539539
break;
540540
case 'c':
541541
snprintf(config_file, sizeof(config_file), "%s", optarg);
@@ -568,7 +568,7 @@ int main(int argc, char *argv[])
568568
goto errout;
569569
}
570570

571-
if (is_forground == 0) {
571+
if (is_foreground == 0) {
572572
if (daemon(0, 0) < 0) {
573573
fprintf(stderr, "run daemon process failed, %s\n", strerror(errno));
574574
return 1;

0 commit comments

Comments
 (0)