rtype = &entry->e->attrs[CSA_ENTRY_ATTR_RECURRENCE_RULE_I];
if (rtype->value == NULL ||
rtype->value->item.string_value == NULL ||
- *(rtype->value->item.string_value) == NULL) {
+ *(rtype->value->item.string_value) == '\0' ) {
return (CSA_E_INVALID_PARAMETER);
}
}
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 = '@';
/* 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 = '@';
if ((cal = (Calendar *)malloc(sizeof(Calendar))) == NULL)
return(NULL);
- memset((void *)cal, NULL, sizeof(Calendar));
+ memset((void *)cal, 0, sizeof(Calendar));
if ((cal->name = strdup(calendar)) == NULL) {
free(cal);
for (i = 1, j = 0; i <= _DtCM_DEFINED_CAL_ATTR_SIZE; i++) {
if (_CSA_cal_attr_info[i].fst_vers > 0 &&
_CSA_cal_attr_info[i].fst_vers <= cal->file_version) {
- if (i == CSA_CAL_ATTR_CALENDAR_OWNER_I && *buf == NULL)
+ if (i == CSA_CAL_ATTR_CALENDAR_OWNER_I && *buf == '\0')
continue;
if ((names[j] =
if (_DtCmIsUserName(calname) == B_TRUE)
strcpy(owner, calname);
else
- *owner = NULL;
+ *owner = '\0';
free(calname);
return (CSA_SUCCESS);
} else {
if ((stat = _get_owner_from_old_cal(cal, buf)) != CSA_SUCCESS)
return (stat);
- else if (*buf == NULL)
+ else if (*buf == '\0')
return (CSA_SUCCESS);
else
owner = buf;
return (CSA_E_INSUFFICIENT_MEMORY);
else {
*attrs = newptr;
- memset((void *)&(*attrs)[*num_attrs+1], NULL,
+ memset((void *)&(*attrs)[*num_attrs+1], 0,
sizeof(cms_attribute) * (index - *num_attrs));
}
_csa_duration_to_iso8601(atoi(remval->value), timestr);
rval.lead_time = timestr;
- if (remval->clientdata && *remval->clientdata != NULL) {
+ if (remval->clientdata && *remval->clientdata != '\0') {
rval.reminder_data.size = strlen(remval->clientdata);
rval.reminder_data.data = (unsigned char *)remval->clientdata;
} else {
{
strncpy(buf, (char *)aptr->value->item.opaque_data_value->data,
aptr->value->item.opaque_data_value->size);
- buf[aptr->value->item.opaque_data_value->size] = NULL;
+ buf[aptr->value->item.opaque_data_value->size] = '\0';
ptr = strchr(buf, ':');
if (ptr != NULL)
- *ptr = NULL;
+ *ptr = '\0';
appt->appt_id.key = atol(buf);
}
memcpy(newattr->clientdata, val->reminder_data.data,
val->reminder_data.size);
- newattr->clientdata[val->reminder_data.size] = NULL;
+ newattr->clientdata[val->reminder_data.size] = '\0';
} else if ((newattr->clientdata = calloc(1,1)) == NULL) {
_DtCm_free_attr4(newattr);
{
_DtCm_remove_from_entry_list(entry->cal, (caddr_t)entry, (caddr_t)entry);
if (entry->e) _DtCm_free_cms_entry(entry->e);
- memset((void *)entry, NULL, sizeof(_DtCm_libentry));
+ memset((void *)entry, 0, sizeof(_DtCm_libentry));
}
/*
nptr = entry->next;
if (entry->e) _DtCm_free_cms_entry(entry->e);
- memset((void *)entry, NULL, sizeof(_DtCm_libentry));
+ memset((void *)entry, 0, sizeof(_DtCm_libentry));
free(entry);
numptr = ptr;
while (*ptr >= '0' && *ptr <= '9') ptr++;
- if (numptr == ptr || !(*ptr && *ptr++ == 'S' && *ptr == NULL))
+ if (numptr == ptr || !(*ptr && *ptr++ == 'S' && *ptr == '\0'))
return (-1);
else {
num = atoi(numptr);
get_component(&str2, com2, '.');
if (*com1) {
- if (*com2 == NULL)
+ if (*com2 == '\0')
return (B_TRUE);
} else {
- if (*com2 == NULL)
+ if (*com2 == '\0')
return (B_TRUE);
else
return (B_FALSE);
/* take care of case: a.b a. */
if (strcmp(str2, ".") == 0
- && (strcmp(str1, ".") != 0 || *str1 != NULL))
+ && (strcmp(str1, ".") != 0 || *str1 != '\0'))
return (B_FALSE);
/* skip "." */
if (*str1 == '.') {
- if (*str2 == NULL)
+ if (*str2 == '\0')
return (B_TRUE);
else {
str1++;
str2++;
}
- } else if (strcmp(str2, ".") == 0 || *str2 == NULL)
+ } else if (strcmp(str2, ".") == 0 || *str2 == '\0')
return (B_TRUE);
else
return (B_FALSE);
get_last_component(str2, &ptr2, com2, '.');
if (*com1) {
- if (*com2 == NULL)
+ if (*com2 == '\0')
return (B_TRUE);
} else {
- if (*com2 == NULL)
+ if (*com2 == '\0')
return (B_TRUE);
else
return (B_FALSE);
if (ptr == buf)
return(NULL);
else {
- *ptr = NULL;
+ *ptr = '\0';
return(strdup(buf));
}
}
{
int i, len;
- if (str2 == NULL || *str2 == NULL)
+ if (str2 == NULL || *str2 == '\0')
return (B_TRUE);
- if (str1 == NULL || *str1 == NULL) {
+ if (str1 == NULL || *str1 == '\0') {
return (B_FALSE);
} else {
len = strlen(str2);
- for (i = 0; str1[i] != NULL; i++) {
+ for (i = 0; str1[i] != '\0'; i++) {
if (strncasecmp(&str1[i], str2, len) == 0)
return (B_TRUE);
}
return (CSA_E_INSUFFICIENT_MEMORY);
} else {
tbl->names = newptr;
- memset((void *)&tbl->names[tbl->size+1], NULL,
+ memset((void *)&tbl->names[tbl->size+1], 0,
sizeof(char *)*(index - tbl->size));
}
}
endDate : /* empty */
{
- $$ = NULL;
+ $$ = '\0';
}
| DATE
{
if (_csa_iso8601_to_tick($1, &$$) == -1)
- $$ = NULL;
+ $$ = '\0';
}
;
/* check to make sure user is not creating a calendar
* using another user's name
*/
- if (ptr = strchr(cal->name, '@')) *ptr = NULL;
+ if (ptr = strchr(cal->name, '@')) *ptr = '\0';
if (_DtCmIsUserName(cal->name) == B_TRUE) {
if ((owner = _DtCmGetUserName()) == NULL)
boolean_t isowner = B_FALSE;
/* first check if user is owner */
- if (ptr = strchr(cal->name, '@')) *ptr = NULL;
+ if (ptr = strchr(cal->name, '@')) *ptr = '\0';
if (_DtCmIsUserName(cal->name) == B_TRUE) {
if (strcmp(user, cal->name) == 0) {