Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149486200
D48928.1790248643.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
21 KB
Referenced Files
None
Subscribers
None
D48928.1790248643.diff
View Options
diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h
--- a/usr.sbin/ctld/ctld.h
+++ b/usr.sbin/ctld/ctld.h
@@ -116,7 +116,7 @@
char *pg_name;
struct auth_group *pg_discovery_auth_group;
int pg_discovery_filter;
- int pg_foreign;
+ bool pg_foreign;
bool pg_unassigned;
TAILQ_HEAD(, portal) pg_portals;
TAILQ_HEAD(, port) pg_ports;
@@ -150,7 +150,7 @@
struct pport *p_pport;
struct target *p_target;
- int p_ioctl_port;
+ bool p_ioctl_port;
int p_ioctl_pp;
int p_ioctl_vp;
uint32_t p_ctl_port;
@@ -247,19 +247,19 @@
extern int ctl_fd;
-int parse_conf(struct conf *newconf, const char *path);
-int uclparse_conf(struct conf *conf, const char *path);
+bool parse_conf(struct conf *newconf, const char *path);
+bool uclparse_conf(struct conf *conf, const char *path);
struct conf *conf_new(void);
struct conf *conf_new_from_kernel(struct kports *kports);
void conf_delete(struct conf *conf);
-int conf_verify(struct conf *conf);
+bool conf_verify(struct conf *conf);
struct auth_group *auth_group_new(struct conf *conf, const char *name);
void auth_group_delete(struct auth_group *ag);
struct auth_group *auth_group_find(const struct conf *conf,
const char *name);
-int auth_group_set_type(struct auth_group *ag,
+bool auth_group_set_type(struct auth_group *ag,
const char *type);
const struct auth *auth_new_chap(struct auth_group *ag,
@@ -275,7 +275,7 @@
bool auth_name_defined(const struct auth_group *ag);
const struct auth_name *auth_name_find(const struct auth_group *ag,
const char *initiator_name);
-int auth_name_check(const struct auth_group *ag,
+bool auth_name_check(const struct auth_group *ag,
const char *initiator_name);
const struct auth_portal *auth_portal_new(struct auth_group *ag,
@@ -283,23 +283,23 @@
bool auth_portal_defined(const struct auth_group *ag);
const struct auth_portal *auth_portal_find(const struct auth_group *ag,
const struct sockaddr_storage *sa);
-int auth_portal_check(const struct auth_group *ag,
+bool auth_portal_check(const struct auth_group *ag,
const struct sockaddr_storage *sa);
struct portal_group *portal_group_new(struct conf *conf, const char *name);
void portal_group_delete(struct portal_group *pg);
struct portal_group *portal_group_find(const struct conf *conf,
const char *name);
-int portal_group_add_listen(struct portal_group *pg,
+bool portal_group_add_listen(struct portal_group *pg,
const char *listen, bool iser);
-int portal_group_set_filter(struct portal_group *pg,
+bool portal_group_set_filter(struct portal_group *pg,
const char *filter);
-int portal_group_set_offload(struct portal_group *pg,
+bool portal_group_set_offload(struct portal_group *pg,
const char *offload);
-int portal_group_set_redirection(struct portal_group *pg,
+bool portal_group_set_redirection(struct portal_group *pg,
const char *addr);
-int isns_new(struct conf *conf, const char *addr);
+bool isns_new(struct conf *conf, const char *addr);
void isns_delete(struct isns *is);
void isns_register(struct isns *isns, struct isns *oldisns);
void isns_check(struct isns *isns);
@@ -323,13 +323,13 @@
struct port *port_find_in_pg(const struct portal_group *pg,
const char *target);
void port_delete(struct port *port);
-int port_is_dummy(struct port *port);
+bool port_is_dummy(struct port *port);
struct target *target_new(struct conf *conf, const char *name);
void target_delete(struct target *target);
struct target *target_find(struct conf *conf,
const char *name);
-int target_set_redirection(struct target *target,
+bool target_set_redirection(struct target *target,
const char *addr);
struct lun *lun_new(struct conf *conf, const char *name);
diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c
--- a/usr.sbin/ctld/ctld.c
+++ b/usr.sbin/ctld/ctld.c
@@ -340,16 +340,16 @@
return (NULL);
}
-int
+bool
auth_name_check(const struct auth_group *ag, const char *initiator_name)
{
if (!auth_name_defined(ag))
- return (0);
+ return (true);
if (auth_name_find(ag, initiator_name) == NULL)
- return (1);
+ return (false);
- return (0);
+ return (true);
}
const struct auth_portal *
@@ -466,17 +466,17 @@
return (NULL);
}
-int
+bool
auth_portal_check(const struct auth_group *ag, const struct sockaddr_storage *sa)
{
if (!auth_portal_defined(ag))
- return (0);
+ return (true);
if (auth_portal_find(ag, sa) == NULL)
- return (1);
+ return (false);
- return (0);
+ return (true);
}
struct auth_group *
@@ -540,7 +540,7 @@
return (NULL);
}
-int
+bool
auth_group_set_type(struct auth_group *ag, const char *str)
{
int type;
@@ -560,7 +560,7 @@
else
log_warnx("invalid auth-type \"%s\" for target "
"\"%s\"", str, ag->ag_target->t_name);
- return (1);
+ return (false);
}
if (ag->ag_type != AG_TYPE_UNKNOWN && ag->ag_type != type) {
@@ -573,12 +573,12 @@
"\"%s\"; already has a different type",
str, ag->ag_target->t_name);
}
- return (1);
+ return (false);
}
ag->ag_type = type;
- return (0);
+ return (true);
}
static struct portal *
@@ -722,7 +722,7 @@
return ((error != 0) ? 1 : 0);
}
-int
+bool
portal_group_add_listen(struct portal_group *pg, const char *value, bool iser)
{
struct portal *portal;
@@ -734,7 +734,7 @@
if (parse_addr_port(portal->p_listen, "3260", &portal->p_ai)) {
log_warnx("invalid listen address %s", portal->p_listen);
portal_delete(portal);
- return (1);
+ return (false);
}
/*
@@ -742,10 +742,10 @@
* those into multiple portals.
*/
- return (0);
+ return (true);
}
-int
+bool
isns_new(struct conf *conf, const char *addr)
{
struct isns *isns;
@@ -760,7 +760,7 @@
if (parse_addr_port(isns->i_addr, "3205", &isns->i_ai)) {
log_warnx("invalid iSNS address %s", isns->i_addr);
isns_delete(isns);
- return (1);
+ return (false);
}
/*
@@ -768,7 +768,7 @@
* those into multiple servers.
*/
- return (0);
+ return (true);
}
void
@@ -1007,7 +1007,7 @@
set_timeout(0, false);
}
-int
+bool
portal_group_set_filter(struct portal_group *pg, const char *str)
{
int filter;
@@ -1025,7 +1025,7 @@
"\"%s\"; valid values are \"none\", \"portal\", "
"\"portal-name\", and \"portal-name-auth\"",
str, pg->pg_name);
- return (1);
+ return (false);
}
if (pg->pg_discovery_filter != PG_FILTER_UNKNOWN &&
@@ -1033,15 +1033,15 @@
log_warnx("cannot set discovery-filter to \"%s\" for "
"portal-group \"%s\"; already has a different "
"value", str, pg->pg_name);
- return (1);
+ return (false);
}
pg->pg_discovery_filter = filter;
- return (0);
+ return (true);
}
-int
+bool
portal_group_set_offload(struct portal_group *pg, const char *offload)
{
@@ -1049,15 +1049,15 @@
log_warnx("cannot set offload to \"%s\" for "
"portal-group \"%s\"; already defined",
offload, pg->pg_name);
- return (1);
+ return (false);
}
pg->pg_offload = checked_strdup(offload);
- return (0);
+ return (true);
}
-int
+bool
portal_group_set_redirection(struct portal_group *pg, const char *addr)
{
@@ -1065,12 +1065,12 @@
log_warnx("cannot set redirection to \"%s\" for "
"portal-group \"%s\"; already defined",
addr, pg->pg_name);
- return (1);
+ return (false);
}
pg->pg_redirection = checked_strdup(addr);
- return (0);
+ return (true);
}
struct pport *
@@ -1142,7 +1142,6 @@
log_err(1, "calloc");
port->p_conf = conf;
port->p_name = name;
- port->p_ioctl_port = 0;
TAILQ_INSERT_TAIL(&conf->conf_ports, port, p_next);
TAILQ_INSERT_TAIL(&target->t_ports, port, p_ts);
port->p_target = target;
@@ -1188,7 +1187,7 @@
log_err(1, "calloc");
port->p_conf = conf;
port->p_name = name;
- port->p_ioctl_port = 1;
+ port->p_ioctl_port = true;
port->p_ioctl_pp = pp;
port->p_ioctl_vp = vp;
TAILQ_INSERT_TAIL(&conf->conf_ports, port, p_next);
@@ -1266,17 +1265,17 @@
free(port);
}
-int
+bool
port_is_dummy(struct port *port)
{
if (port->p_portal_group) {
if (port->p_portal_group->pg_foreign)
- return (1);
+ return (true);
if (TAILQ_EMPTY(&port->p_portal_group->pg_portals))
- return (1);
+ return (true);
}
- return (0);
+ return (false);
}
struct target *
@@ -1340,7 +1339,7 @@
return (NULL);
}
-int
+bool
target_set_redirection(struct target *target, const char *addr)
{
@@ -1348,12 +1347,12 @@
log_warnx("cannot set redirection to \"%s\" for "
"target \"%s\"; already defined",
addr, target->t_name);
- return (1);
+ return (false);
}
target->t_redirection = checked_strdup(addr);
- return (0);
+ return (true);
}
struct lun *
@@ -1617,7 +1616,7 @@
}
#endif
-static int
+static bool
conf_verify_lun(struct lun *lun)
{
const struct lun *lun2;
@@ -1628,19 +1627,19 @@
if (lun->l_path == NULL) {
log_warnx("missing path for lun \"%s\"",
lun->l_name);
- return (1);
+ return (false);
}
} else if (strcmp(lun->l_backend, "ramdisk") == 0) {
if (lun->l_size == 0) {
log_warnx("missing size for ramdisk-backed lun \"%s\"",
lun->l_name);
- return (1);
+ return (false);
}
if (lun->l_path != NULL) {
log_warnx("path must not be specified "
"for ramdisk-backed lun \"%s\"",
lun->l_name);
- return (1);
+ return (false);
}
}
if (lun->l_blocksize == 0) {
@@ -1651,12 +1650,12 @@
} else if (lun->l_blocksize < 0) {
log_warnx("invalid blocksize for lun \"%s\"; "
"must be larger than 0", lun->l_name);
- return (1);
+ return (false);
}
if (lun->l_size != 0 && lun->l_size % lun->l_blocksize != 0) {
log_warnx("invalid size for lun \"%s\"; "
"must be multiple of blocksize", lun->l_name);
- return (1);
+ return (false);
}
TAILQ_FOREACH(lun2, &lun->l_conf->conf_luns, l_next) {
if (lun == lun2)
@@ -1670,10 +1669,10 @@
}
}
- return (0);
+ return (true);
}
-int
+bool
conf_verify(struct conf *conf)
{
struct auth_group *ag;
@@ -1682,15 +1681,14 @@
struct target *targ;
struct lun *lun;
bool found;
- int error, i;
+ int i;
if (conf->conf_pidfile_path == NULL)
conf->conf_pidfile_path = checked_strdup(DEFAULT_PIDFILE);
TAILQ_FOREACH(lun, &conf->conf_luns, l_next) {
- error = conf_verify_lun(lun);
- if (error != 0)
- return (error);
+ if (!conf_verify_lun(lun))
+ return (false);
}
TAILQ_FOREACH(targ, &conf->conf_targets, t_next) {
if (targ->t_auth_group == NULL) {
@@ -1780,7 +1778,7 @@
}
}
- return (0);
+ return (true);
}
static bool
@@ -2547,7 +2545,7 @@
struct conf *conf;
struct auth_group *ag;
struct portal_group *pg;
- int error;
+ bool valid;
log_debugx("obtaining configuration from %s", path);
@@ -2568,11 +2566,11 @@
assert(pg != NULL);
if (ucl)
- error = uclparse_conf(conf, path);
+ valid = uclparse_conf(conf, path);
else
- error = parse_conf(conf, path);
+ valid = parse_conf(conf, path);
- if (error != 0) {
+ if (!valid) {
conf_delete(conf);
return (NULL);
}
@@ -2598,8 +2596,7 @@
conf->conf_kernel_port_on = true;
- error = conf_verify(conf);
- if (error != 0) {
+ if (!conf_verify(conf)) {
conf_delete(conf);
return (NULL);
}
@@ -2611,7 +2608,7 @@
* If the config file specifies physical ports for any target, associate them
* with the config file. If necessary, create them.
*/
-static int
+static bool
new_pports_from_conf(struct conf *conf, struct kports *kports)
{
struct target *targ;
@@ -2629,7 +2626,7 @@
if (tp == NULL) {
log_warnx("can't create new ioctl port "
"for target \"%s\"", targ->t_name);
- return (1);
+ return (false);
}
continue;
@@ -2639,22 +2636,22 @@
if (pp == NULL) {
log_warnx("unknown port \"%s\" for target \"%s\"",
targ->t_pport, targ->t_name);
- return (1);
+ return (false);
}
if (!TAILQ_EMPTY(&pp->pp_ports)) {
log_warnx("can't link port \"%s\" to target \"%s\", "
"port already linked to some target",
targ->t_pport, targ->t_name);
- return (1);
+ return (false);
}
tp = port_new_pp(conf, targ, pp);
if (tp == NULL) {
log_warnx("can't link port \"%s\" to target \"%s\"",
targ->t_pport, targ->t_name);
- return (1);
+ return (false);
}
}
- return (0);
+ return (true);
}
int
@@ -2666,14 +2663,14 @@
const char *config_path = DEFAULT_CONFIG_PATH;
int debug = 0, ch, error;
pid_t otherpid;
- bool dont_daemonize = false;
+ bool daemonize = true;
bool test_config = false;
bool use_ucl = false;
while ((ch = getopt(argc, argv, "dtuf:R")) != -1) {
switch (ch) {
case 'd':
- dont_daemonize = true;
+ daemonize = false;
debug++;
break;
case 't':
@@ -2734,10 +2731,10 @@
newconf->conf_debug = debug;
}
- if (new_pports_from_conf(newconf, &kports))
+ if (!new_pports_from_conf(newconf, &kports))
log_errx(1, "Error associating physical ports; exiting");
- if (dont_daemonize == false) {
+ if (daemonize) {
log_debugx("daemonizing");
if (daemon(0, 0) == -1) {
log_warn("cannot daemonize");
@@ -2767,7 +2764,7 @@
set_timeout((newconf->conf_isns_period + 2) / 3, false);
for (;;) {
- main_loop(dont_daemonize);
+ main_loop(!daemonize);
if (sighup_received) {
sighup_received = false;
log_debugx("received SIGHUP, reloading configuration");
diff --git a/usr.sbin/ctld/discovery.c b/usr.sbin/ctld/discovery.c
--- a/usr.sbin/ctld/discovery.c
+++ b/usr.sbin/ctld/discovery.c
@@ -164,14 +164,14 @@
assert(pg->pg_discovery_filter != PG_FILTER_UNKNOWN);
if (pg->pg_discovery_filter >= PG_FILTER_PORTAL &&
- auth_portal_check(ag, &conn->conn_initiator_sa) != 0) {
+ !auth_portal_check(ag, &conn->conn_initiator_sa)) {
log_debugx("initiator does not match initiator portals "
"allowed for target \"%s\"; skipping", targ->t_name);
return (true);
}
if (pg->pg_discovery_filter >= PG_FILTER_PORTAL_NAME &&
- auth_name_check(ag, conn->conn_initiator_name) != 0) {
+ !auth_name_check(ag, conn->conn_initiator_name)) {
log_debugx("initiator does not match initiator names "
"allowed for target \"%s\"; skipping", targ->t_name);
return (true);
diff --git a/usr.sbin/ctld/login.c b/usr.sbin/ctld/login.c
--- a/usr.sbin/ctld/login.c
+++ b/usr.sbin/ctld/login.c
@@ -1027,12 +1027,12 @@
/*
* Enforce initiator-name and initiator-portal.
*/
- if (auth_name_check(ag, initiator_name) != 0) {
+ if (!auth_name_check(ag, initiator_name)) {
login_send_error(request, 0x02, 0x02);
log_errx(1, "initiator does not match allowed initiator names");
}
- if (auth_portal_check(ag, &conn->conn_initiator_sa) != 0) {
+ if (!auth_portal_check(ag, &conn->conn_initiator_sa)) {
login_send_error(request, 0x02, 0x02);
log_errx(1, "initiator does not match allowed "
"initiator portals");
diff --git a/usr.sbin/ctld/parse.y b/usr.sbin/ctld/parse.y
--- a/usr.sbin/ctld/parse.y
+++ b/usr.sbin/ctld/parse.y
@@ -162,11 +162,11 @@
isns_server: ISNS_SERVER STR
{
- int error;
+ bool ok;
- error = isns_new(conf, $2);
+ ok = isns_new(conf, $2);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
@@ -246,11 +246,11 @@
auth_group_auth_type: AUTH_TYPE STR
{
- int error;
+ bool ok;
- error = auth_group_set_type(auth_group, $2);
+ ok = auth_group_set_type(auth_group, $2);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
@@ -382,11 +382,11 @@
portal_group_discovery_filter: DISCOVERY_FILTER STR
{
- int error;
+ bool ok;
- error = portal_group_set_filter(portal_group, $2);
+ ok = portal_group_set_filter(portal_group, $2);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
@@ -394,39 +394,39 @@
portal_group_foreign: FOREIGN
{
- portal_group->pg_foreign = 1;
+ portal_group->pg_foreign = true;
}
;
portal_group_listen: LISTEN STR
{
- int error;
+ bool ok;
- error = portal_group_add_listen(portal_group, $2, false);
+ ok = portal_group_add_listen(portal_group, $2, false);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
portal_group_listen_iser: LISTEN_ISER STR
{
- int error;
+ bool ok;
- error = portal_group_add_listen(portal_group, $2, true);
+ ok = portal_group_add_listen(portal_group, $2, true);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
portal_group_offload: OFFLOAD STR
{
- int error;
+ bool ok;
- error = portal_group_set_offload(portal_group, $2);
+ ok = portal_group_set_offload(portal_group, $2);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
@@ -445,11 +445,11 @@
portal_group_redirect: REDIRECT STR
{
- int error;
+ bool ok;
- error = portal_group_set_redirection(portal_group, $2);
+ ok = portal_group_set_redirection(portal_group, $2);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
@@ -630,7 +630,7 @@
target_auth_type: AUTH_TYPE STR
{
- int error;
+ bool ok;
if (target->t_auth_group != NULL) {
if (target->t_auth_group->ag_name != NULL) {
@@ -647,9 +647,9 @@
}
target->t_auth_group->ag_target = target;
}
- error = auth_group_set_type(target->t_auth_group, $2);
+ ok = auth_group_set_type(target->t_auth_group, $2);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
@@ -841,11 +841,11 @@
target_redirect: REDIRECT STR
{
- int error;
+ bool ok;
- error = target_set_redirection(target, $2);
+ ok = target_set_redirection(target, $2);
free($2);
- if (error != 0)
+ if (!ok)
return (1);
}
;
@@ -1101,7 +1101,7 @@
lineno, yytext, str);
}
-int
+bool
parse_conf(struct conf *newconf, const char *path)
{
int error;
@@ -1110,7 +1110,7 @@
yyin = fopen(path, "r");
if (yyin == NULL) {
log_warn("unable to open configuration file %s", path);
- return (1);
+ return (false);
}
lineno = 1;
@@ -1122,5 +1122,5 @@
lun = NULL;
fclose(yyin);
- return (error);
+ return (error == 0);
}
diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c
--- a/usr.sbin/ctld/uclparse.c
+++ b/usr.sbin/ctld/uclparse.c
@@ -247,7 +247,6 @@
{
ucl_object_iter_t it = NULL, iter = NULL;
const ucl_object_t *obj = NULL, *child = NULL;
- int err = 0;
/* Pass 1 - everything except targets */
while ((obj = ucl_iterate_object(top, &it, true))) {
@@ -298,11 +297,9 @@
if (child->type != UCL_STRING)
return (false);
- err = isns_new(conf,
- ucl_object_tostring(child));
- if (err != 0) {
+ if (!isns_new(conf,
+ ucl_object_tostring(child)))
return (false);
- }
}
} else {
log_warnx("\"isns-server\" property value is "
@@ -398,7 +395,6 @@
ucl_object_iter_t it = NULL, it2 = NULL;
const ucl_object_t *obj = NULL, *tmp = NULL;
const char *key;
- int err;
if (!strcmp(name, "default") &&
conf->conf_default_ag_defined == false) {
@@ -417,8 +413,7 @@
if (!strcmp(key, "auth-type")) {
const char *value = ucl_object_tostring(obj);
- err = auth_group_set_type(auth_group, value);
- if (err)
+ if (!auth_group_set_type(auth_group, value))
return (false);
}
@@ -621,23 +616,23 @@
return (false);
}
- if (portal_group_set_filter(portal_group,
- ucl_object_tostring(obj)) != 0)
+ if (!portal_group_set_filter(portal_group,
+ ucl_object_tostring(obj)))
return (false);
}
if (!strcmp(key, "listen")) {
if (obj->type == UCL_STRING) {
- if (portal_group_add_listen(portal_group,
- ucl_object_tostring(obj), false) != 0)
+ if (!portal_group_add_listen(portal_group,
+ ucl_object_tostring(obj), false))
return (false);
} else if (obj->type == UCL_ARRAY) {
while ((tmp = ucl_iterate_object(obj, &it2,
true))) {
- if (portal_group_add_listen(
+ if (!portal_group_add_listen(
portal_group,
ucl_object_tostring(tmp),
- false) != 0)
+ false))
return (false);
}
} else {
@@ -650,16 +645,16 @@
if (!strcmp(key, "listen-iser")) {
if (obj->type == UCL_STRING) {
- if (portal_group_add_listen(portal_group,
- ucl_object_tostring(obj), true) != 0)
+ if (!portal_group_add_listen(portal_group,
+ ucl_object_tostring(obj), true))
return (false);
} else if (obj->type == UCL_ARRAY) {
while ((tmp = ucl_iterate_object(obj, &it2,
true))) {
- if (portal_group_add_listen(
+ if (!portal_group_add_listen(
portal_group,
ucl_object_tostring(tmp),
- true) != 0)
+ true))
return (false);
}
} else {
@@ -678,8 +673,8 @@
return (false);
}
- if (portal_group_set_redirection(portal_group,
- ucl_object_tostring(obj)) != 0)
+ if (!portal_group_set_redirection(portal_group,
+ ucl_object_tostring(obj)))
return (false);
}
@@ -767,8 +762,6 @@
}
if (!strcmp(key, "auth-type")) {
- int error;
-
if (target->t_auth_group != NULL) {
if (target->t_auth_group->ag_name != NULL) {
log_warnx("cannot use both auth-group and "
@@ -783,9 +776,8 @@
target->t_auth_group->ag_target = target;
}
- error = auth_group_set_type(target->t_auth_group,
- ucl_object_tostring(obj));
- if (error != 0)
+ if (!auth_group_set_type(target->t_auth_group,
+ ucl_object_tostring(obj)))
return (false);
}
@@ -889,8 +881,8 @@
return (false);
}
- if (target_set_redirection(target,
- ucl_object_tostring(obj)) != 0)
+ if (!target_set_redirection(target,
+ ucl_object_tostring(obj)))
return (false);
}
@@ -1001,7 +993,7 @@
return (true);
}
-int
+bool
uclparse_conf(struct conf *newconf, const char *path)
{
struct ucl_parser *parser;
@@ -1015,7 +1007,7 @@
log_warn("unable to parse configuration file %s: %s", path,
ucl_parser_get_error(parser));
ucl_parser_free(parser);
- return (1);
+ return (false);
}
top = ucl_parser_get_object(parser);
@@ -1023,5 +1015,5 @@
ucl_object_unref(top);
ucl_parser_free(parser);
- return (parsed ? 0 : 1);
+ return (parsed);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 24, 11:17 AM (13 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29899443
Default Alt Text
D48928.1790248643.diff (21 KB)
Attached To
Mode
D48928: ctld: Some bool-related cleanups
Attached
Detach File
Event Timeline
Log In to Comment