Changeset 25 for trunk/src/sh_utils.c


Ignore:
Timestamp:
Mar 14, 2006, 10:27:38 PM (14 years ago)
Author:
rainer
Message:

More tests; fix for update+schedule issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_utils.c

    r22 r25  
    205205  SL_ENTER(_("sh_util_strdup"));
    206206
    207   if (str != NULL)
    208     {
    209       len = sl_strlen(str);
    210       p   = SH_ALLOC (len + 1);
    211       (void) sl_strlcpy (p, str, len+1);
    212     }
     207  SH_VALIDATE_NE(str, NULL);
     208
     209  len = sl_strlen(str);
     210  p   = SH_ALLOC (len + 1);
     211  (void) sl_strlcpy (p, str, len+1);
     212
    213213  SL_RETURN( p, _("sh_util_strdup"));
    214214}
     
    224224  ret = *str;
    225225
    226   if (ret == NULL) {
    227     SL_RETURN(ret, _("sh_util_strsep"));
    228   }
     226  SH_VALIDATE_NE(ret, NULL);
    229227
    230228  for (c = *str; *c != '\0'; c++) {
Note: See TracChangeset for help on using the changeset viewer.