typo: correct 'hanlde' to 'handle'
This commit is contained in:
parent
cff77eef9d
commit
44cd05a499
3 changed files with 4 additions and 4 deletions
|
|
@ -12,7 +12,7 @@ SRCS = $(SRC_DIR)/main.c \
|
||||||
$(SRC_DIR)/cli/handlers/handle_timeout.c \
|
$(SRC_DIR)/cli/handlers/handle_timeout.c \
|
||||||
$(SRC_DIR)/cli/handlers/handle_ttl.c \
|
$(SRC_DIR)/cli/handlers/handle_ttl.c \
|
||||||
$(SRC_DIR)/cli/handlers/handle_version.c \
|
$(SRC_DIR)/cli/handlers/handle_version.c \
|
||||||
$(SRC_DIR)/cli/handlers/hanlde_verbose.c \
|
$(SRC_DIR)/cli/handlers/handle_verbose.c \
|
||||||
|
|
||||||
TESTS_DIR = tests
|
TESTS_DIR = tests
|
||||||
TESTS= $(TESTS_DIR)/test_main.c
|
TESTS= $(TESTS_DIR)/test_main.c
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ static void init_config(t_ping_config *config);
|
||||||
static void build_long_options(struct option *long_opts, size_t nb_opts,
|
static void build_long_options(struct option *long_opts, size_t nb_opts,
|
||||||
const t_option_descriptor *src);
|
const t_option_descriptor *src);
|
||||||
static const t_option_descriptor *find_option_handler(int opt);
|
static const t_option_descriptor *find_option_handler(int opt);
|
||||||
static int hanlde_one_option(int opt, char *optarg, t_ping_config *config);
|
static int handle_one_option(int opt, char *optarg, t_ping_config *config);
|
||||||
/* ------------------- */
|
/* ------------------- */
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -25,7 +25,7 @@ cli_parse_arguments(int argc, char **argv, t_ping_config *config)
|
||||||
build_long_options(long_opts, g_options_len, g_options);
|
build_long_options(long_opts, g_options_len, g_options);
|
||||||
while (-1 != (opt = getopt_long(argc, argv, opt_str, long_opts, NULL)))
|
while (-1 != (opt = getopt_long(argc, argv, opt_str, long_opts, NULL)))
|
||||||
{
|
{
|
||||||
res = hanlde_one_option(opt, optarg, config);
|
res = handle_one_option(opt, optarg, config);
|
||||||
if (0 != res)
|
if (0 != res)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ cli_parse_arguments(int argc, char **argv, t_ping_config *config)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hanlde_one_option(int opt, char *optarg, t_ping_config *config)
|
handle_one_option(int opt, char *optarg, t_ping_config *config)
|
||||||
{
|
{
|
||||||
const t_option_descriptor *desc = find_option_handler(opt);
|
const t_option_descriptor *desc = find_option_handler(opt);
|
||||||
int res;
|
int res;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue