NULL is a pointer, not string terminator
Replace some instances of NULL to '\0', when referring to string terminator.
This commit is contained in:
committed by
Jon Trulson
parent
3b06b6a6b7
commit
706fccb50e
@@ -1907,8 +1907,8 @@ _CheckNameAtHost(char *owner, char *value)
|
||||
return (CSA_E_FAILURE);
|
||||
}
|
||||
|
||||
if (optr = strchr(owner, '@')) *optr = NULL;
|
||||
if (ptr = strchr(value, '@')) *ptr = NULL;
|
||||
if (optr = strchr(owner, '@')) *optr = '\0';
|
||||
if (ptr = strchr(value, '@')) *ptr = '\0';
|
||||
res = strcmp(value, owner);
|
||||
if (optr) *optr = '@';
|
||||
if (ptr) *ptr = '@';
|
||||
@@ -1965,7 +1965,7 @@ _CheckCalendarName(char *owner, char *cname, cms_attribute_value *val)
|
||||
/* now make sure if cal name is a user name, it's
|
||||
* the same as that of the calling user
|
||||
*/
|
||||
if (ptr = strchr(val->item.string_value, '@')) *ptr = NULL;
|
||||
if (ptr = strchr(val->item.string_value, '@')) *ptr = '\0';
|
||||
isuser = _DtCmIsUserName(val->item.string_value);
|
||||
if (ptr) *ptr = '@';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user