newp->author = $12;
newp->attr = $13;
- if (temp != NULL && (*temp)!=NULL) {
+ if (temp != NULL && (*temp)!='\0') {
item = newp->attr;
while(item!=NULL) {
if(strcmp(item->attr, "ml")==0) {
duration : /* empty */
{
- $$ = NULL;
+ $$ = '\0';
}
| DURATION COLON number
{
void
report_err(char *s)
{
- (void)fprintf (stderr, s);
+ (void)fprintf (stderr, "%s", s);
}
char *
}
k++;
}
- newstr[k] = NULL;
+ newstr[k] = '\0';
return(newstr);
}
return (10);
if (strncmp(month, "Dec", 3) == 0)
return (11);
+
+ return (-1);
}
time_t
if (datestr == NULL)
return (-1);
- memset((void *)&tmstr, NULL, sizeof(struct tm));
+ memset((void *)&tmstr, 0, sizeof(struct tm));
strcpy(datebuf, datestr);
if ((tptr = strchr(ptr, ':')) == NULL)
return (-1);
else {
- *tptr = NULL;
+ *tptr = '\0';
tmstr.tm_hour = atoi(ptr);
}
if ((tptr = strchr(ptr, ':')) == NULL)
return (-1);
else {
- *tptr = NULL;
+ *tptr = '\0';
tmstr.tm_min = atoi(ptr);
}
stat = _DtCm_set_string_attrval(valstr, attrval, type);
break;
case CSA_VALUE_REMINDER:
- memset((void *)&remval, NULL, sizeof (CSA_reminder));
+ memset((void *)&remval, 0, sizeof (CSA_reminder));
if (ptr1 = strchr(valstr, ':')) {
- *ptr1++ = NULL;
+ *ptr1++ = '\0';
if (ptr2 = strchr(ptr1, ':')) {
- *ptr2++ = NULL;
+ *ptr2++ = '\0';
ptr3 = strchr(ptr2, ':');
}
}
stat = _DtCm_set_reminder_attrval(&remval, attrval);
} else {
/* format = "string:string:number:number:string" */
- *ptr3++ = NULL;
+ *ptr3++ = '\0';
if (ptr4 = strchr(ptr3, ':')) {
- *ptr4++ = NULL;
+ *ptr4++ = '\0';
remval.lead_time = valstr;
remval.snooze_time = ptr1;
remval.repeat_count = atoi(ptr2);
break;
case CSA_VALUE_OPAQUE_DATA:
if (ptr1 = strchr(valstr, ':')) {
- *ptr1++ = NULL;
+ *ptr1++ = '\0';
opqval.size = atoi(valstr);
opqval.data = (unsigned char *)ptr1;
stat = _DtCm_set_opaque_attrval(&opqval, attrval);
return (CSA_E_INSUFFICIENT_MEMORY);
}
- *ptr = NULL;
+ *ptr = '\0';
if ((item->user = strdup(string)) == NULL) {
free(item);
return (CSA_E_INSUFFICIENT_MEMORY);
attrs->total += _DEFAULT_ARRAY_SIZE;
attrs->attrs = newptr;
- memset((void *)&attrs->attrs[attrs->current], NULL,
+ memset((void *)&attrs->attrs[attrs->current], 0,
sizeof(cms_attribute)*_DEFAULT_ARRAY_SIZE);
}