diff options
author | Toomas Soome <tsoome@me.com> | 2020-05-19 14:00:25 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2021-03-29 17:57:12 +0300 |
commit | 81de4da4caf1b6a02c80229f9f948f69e09f9719 (patch) | |
tree | 14d63c8af2deece1b7c71a337ce090712e402bb1 | |
parent | a0570dbda2f64cada915185eb4e1b42c3b4bf755 (diff) | |
download | illumos-joyent-81de4da4caf1b6a02c80229f9f948f69e09f9719.tar.gz |
13626 libsldap: implicit conversion from 'enum <anonymous>'
Reviewed by: Yuri Pankov <yuripv@yuripv.dev>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/lib/libsldap/common/ns_confmgr.c | 28 | ||||
-rw-r--r-- | usr/src/lib/libsldap/common/ns_reads.c | 14 |
2 files changed, 20 insertions, 22 deletions
diff --git a/usr/src/lib/libsldap/common/ns_confmgr.c b/usr/src/lib/libsldap/common/ns_confmgr.c index 862e20d035..7fa980d412 100644 --- a/usr/src/lib/libsldap/common/ns_confmgr.c +++ b/usr/src/lib/libsldap/common/ns_confmgr.c @@ -124,7 +124,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) gettext("Unable to open filename '%s' " "for reading (errno=%d)."), file, errno); MKERROR(LOG_ERR, *error, NS_CONFIG_FILE, strdup(errstr), - NS_LDAP_MEMORY); + NS_PARSE_ERR); return (NS_NOTFOUND); } @@ -150,7 +150,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) gettext("Missing Name or Value on line %d."), lineno); MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, - strdup(errstr), NS_LDAP_MEMORY); + strdup(errstr), NS_PARSE_ERR); (void) fclose(fp); return (NS_PARSE_ERR); } @@ -159,7 +159,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) gettext("Illegal profile type on line %d."), lineno); MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, - strdup(errstr), NS_LDAP_MEMORY); + strdup(errstr), NS_PARSE_ERR); (void) fclose(fp); return (NS_PARSE_ERR); } @@ -168,7 +168,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) gettext("Illegal NS_LDAP_FILE_VERSION " "on line %d."), lineno); MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, - strdup(errstr), NS_LDAP_MEMORY); + strdup(errstr), NS_PARSE_ERR); (void) fclose(fp); return (NS_PARSE_ERR); } @@ -188,7 +188,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) gettext("Illegal entry in '%s' on " "line %d"), file, lineno); MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, - strdup(errstr), NS_LDAP_MEMORY); + strdup(errstr), NS_PARSE_ERR); (void) fclose(fp); return (NS_PARSE_ERR); } @@ -208,7 +208,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) gettext("Illegal entry in '%s' on " "line %d"), file, lineno); MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, - strdup(errstr), NS_LDAP_MEMORY); + strdup(errstr), NS_PARSE_ERR); (void) fclose(fp); return (NS_PARSE_ERR); } @@ -220,7 +220,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) (void) snprintf(errstr, sizeof (errstr), gettext("Empty config file: '%s'"), file); MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, strdup(errstr), - NS_LDAP_MEMORY); + NS_PARSE_ERR); return (NS_PARSE_ERR); } if (linelen == -2) { @@ -228,7 +228,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) (void) snprintf(errstr, sizeof (errstr), gettext("Line too long in '%s'"), file); MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, strdup(errstr), - NS_LDAP_MEMORY); + NS_PARSE_ERR); return (NS_PARSE_ERR); } return (NS_SUCCESS); @@ -237,10 +237,8 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error) static ns_ldap_return_code -set_attr(ns_config_t *config_struct, - char *attr_name, - char *attr_val, - ns_ldap_error_t **errorp) +set_attr(ns_config_t *config_struct, char *attr_name, char *attr_val, + ns_ldap_error_t **errorp) { ParamIndexType idx; char errmsg[MAXERROR]; @@ -471,7 +469,7 @@ __print2buf(LineBuf *line, const char *toprint, char *sep) ns_ldap_error_t * __ns_ldap_LoadDoorInfo(LineBuf *configinfo, char *domainname, - ns_config_t *new, int cred_only) + ns_config_t *new, int cred_only) { ns_config_t *ptr; char errstr[MAXERROR]; @@ -824,7 +822,7 @@ __ns_ldap_make_config(ns_ldap_result_t *result) { int l, m; char val[BUFSIZE]; - char *attrname; + char *attrname; ns_ldap_entry_t *entry; ns_ldap_attr_t *attr; char **attrval; @@ -997,7 +995,7 @@ makeconfigerror: */ int __ns_ldap_download(const char *profile, char *addr, char *baseDN, - ns_ldap_error_t **errorp) + ns_ldap_error_t **errorp) { char filter[BUFSIZE]; int rc; diff --git a/usr/src/lib/libsldap/common/ns_reads.c b/usr/src/lib/libsldap/common/ns_reads.c index da987fd81a..414ddffaa1 100644 --- a/usr/src/lib/libsldap/common/ns_reads.c +++ b/usr/src/lib/libsldap/common/ns_reads.c @@ -2052,7 +2052,7 @@ multi_result(ns_ldap_cookie_t *cookie) gettext(ldap_err2string(cookie->err_rc))); err = strdup(errstr); MKERROR(LOG_WARNING, *errorp, NS_LDAP_INTERNAL, err, - NS_LDAP_MEMORY); + LDAP_ERROR); cookie->err_rc = NS_LDAP_INTERNAL; cookie->errorp = *errorp; return (LDAP_ERROR); @@ -2122,7 +2122,7 @@ multi_result(ns_ldap_cookie_t *cookie) gettext(ldap_err2string(cookie->err_rc))); err = strdup(errstr); MKERROR(LOG_WARNING, *errorp, NS_LDAP_INTERNAL, err, - NS_LDAP_MEMORY); + LDAP_ERROR); cookie->err_rc = NS_LDAP_INTERNAL; cookie->errorp = *errorp; return (LDAP_ERROR); @@ -2380,7 +2380,7 @@ search_state_machine(ns_ldap_cookie_t *cookie, ns_state_t state, int cycle) state); err = strdup(errstr); MKERROR(LOG_WARNING, *errorp, NS_LDAP_INTERNAL, err, - NS_LDAP_MEMORY); + LDAP_ERROR); cookie->err_rc = NS_LDAP_INTERNAL; cookie->errorp = *errorp; cookie->new_state = EXIT; @@ -2922,15 +2922,15 @@ search_state_machine(ns_ldap_cookie_t *cookie, ns_state_t state, int cycle) if (cookie->err_rc == LDAP_SERVER_DOWN) { MKERROR(LOG_INFO, *errorp, cookie->err_rc, err, - NS_LDAP_MEMORY); + LDAP_ERROR); } else { MKERROR(LOG_WARNING, *errorp, cookie->err_rc, err, - NS_LDAP_MEMORY); + LDAP_ERROR); } } else { MKERROR(LOG_WARNING, *errorp, NS_LDAP_INTERNAL, - err, NS_LDAP_MEMORY); + err, LDAP_ERROR); } cookie->err_rc = NS_LDAP_INTERNAL; cookie->errorp = *errorp; @@ -2954,7 +2954,7 @@ search_state_machine(ns_ldap_cookie_t *cookie, ns_state_t state, int cycle) cookie->state); err = strdup(errstr); MKERROR(LOG_WARNING, *errorp, NS_LDAP_INTERNAL, err, - NS_LDAP_MEMORY); + LDAP_ERROR); cookie->err_rc = NS_LDAP_INTERNAL; cookie->errorp = *errorp; return (ERROR); |