summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2017-07-16 10:40:40 +0300
committerGordon Ross <gwr@nexenta.com>2018-03-25 14:16:20 -0400
commit3718f283515535a82b83e368bda0af10d2bf2c4f (patch)
treeaa34e4c238ea55e5569cad0fda63a97b028f1c2c
parentb232a94496f2b078a464fd9a44bc01d2f2894e78 (diff)
downloadillumos-joyent-3718f283515535a82b83e368bda0af10d2bf2c4f.tar.gz
9316 ldap: comparison between pointer and zero character constant
Reviewed by: Dominic Hassler <hadfl@omniosce.org> Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Gordon Ross <gwr@nexenta.com>
-rw-r--r--usr/src/cmd/ldap/common/ldapsearch.c2
-rw-r--r--usr/src/cmd/ldap/ns_ldap/ldapaddent.c4
-rw-r--r--usr/src/cmd/ldap/ns_ldap/ldapclient.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/cmd/ldap/common/ldapsearch.c b/usr/src/cmd/ldap/common/ldapsearch.c
index 277be6e3ef..2160f13ece 100644
--- a/usr/src/cmd/ldap/common/ldapsearch.c
+++ b/usr/src/cmd/ldap/common/ldapsearch.c
@@ -240,7 +240,7 @@ main( int argc, char **argv )
if ( argv[ optind ] == NULL ) {
attrs = NULL;
- } else if ( sortattr == NULL || *sortattr == '\0' || server_sort) {
+ } else if ( sortattr == NULL || *sortattr == NULL || server_sort) {
attrs = &argv[ optind ];
} else {
attrs = ldap_charray_dup( &argv[ optind ] );
diff --git a/usr/src/cmd/ldap/ns_ldap/ldapaddent.c b/usr/src/cmd/ldap/ns_ldap/ldapaddent.c
index 62c028c481..e4a645636a 100644
--- a/usr/src/cmd/ldap/ns_ldap/ldapaddent.c
+++ b/usr/src/cmd/ldap/ns_ldap/ldapaddent.c
@@ -109,7 +109,7 @@ ascii_to_int(char *str)
if (c == NULL || *c == '\0')
return (-1);
- while (c != '\0' && *c == ' ')
+ while (*c == ' ')
c++;
if (*c == '\0')
return (-1);
@@ -2097,7 +2097,7 @@ genent_aliases(char *line, int (*cback)())
}
t[0] = '\0';
- if (++t == '\0') {
+ if ((++t)[0] == '\0') {
(void) strlcpy(parse_err_msg, gettext("no alias value"),
PARSE_ERR_MSG_LEN);
return (GENENT_PARSEERR);
diff --git a/usr/src/cmd/ldap/ns_ldap/ldapclient.c b/usr/src/cmd/ldap/ns_ldap/ldapclient.c
index 937172feb2..c36401f35e 100644
--- a/usr/src/cmd/ldap/ns_ldap/ldapclient.c
+++ b/usr/src/cmd/ldap/ns_ldap/ldapclient.c
@@ -2523,7 +2523,7 @@ adminCredCheck(clientopts_t *arglist)
}
/* Now let's check if we have the cred stuff we need */
- if (adminDN == NULL || adminDN[0] == '\0') {
+ if (adminDN == NULL || adminDN[0] == NULL) {
CLIENT_FPUTS(
gettext("Shadow Update is enabled, but "
"no adminDN is configured.\n"), stderr);
@@ -2532,7 +2532,7 @@ adminCredCheck(clientopts_t *arglist)
}
/* If we need adminPassword (prompt) */
- if (adminPassword == NULL || adminPassword[0] == '\0') {
+ if (adminPassword == NULL || adminPassword[0] == NULL) {
CLIENT_FPUTS(
gettext("Shadow Update requires adminPassword\n"),
stderr);