rem: icalerror_set_errno(ICAL_BADARG_ERROR);
add: icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
context: struct icalreqstattype icalreqstattype_from_string(char* str){  char *p1,*p2;  struct icalreqstattype stat;  int major, minor;  icalerror_check_arg((str != 0),"str");  stat.code = ICAL_UNKNOWN_STATUS;  stat.debug = 0;    stat.desc = 0;  /* Get the status numbers */  sscanf(str, "%d.%d",&major, &minor);  if (major <= 0 || minor < 0){    icalerror_set_errno(ICAL_BADARG_ERROR);    return stat;  }  stat.code = icalenum_num_to_reqstat(major, minor);  if (stat.code == ICAL_UNKNOWN_STATUS){    icalerror_set_errno(ICAL_BADARG_ERROR);    return stat;  }    p1 = strchr(str,';');  if (p1 == 0){/*    icalerror_set_errno(ICAL_BADARG_ERROR);*/    return stat;  }  /* Just ignore the second clause; it will be taken from inside the library    */  p2 = strchr(p1+1,';');  if (p2 != 0 && *p2 != 0){    stat.debug = p2+1;  }   return stat;  }