VirtualBox

Changeset 1307 in kBuild for trunk/src


Ignore:
Timestamp:
Dec 2, 2007 1:02:15 AM (17 years ago)
Author:
bird
Message:

Empty strings are 0 bytes long...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/function.c

    r1171 r1307  
    25632563  /* the simple cases */
    25642564  if (var1 == var2)
    2565     return variable_buffer_output (o, "", 1);       /* eq */
     2565    return variable_buffer_output (o, "", 0);       /* eq */
    25662566  if (!var1 || !var2)
    25672567    return variable_buffer_output (o, argv[2], strlen(argv[2]));
    25682568  if (var1->value == var2->value)
    2569     return variable_buffer_output (o, "", 1);       /* eq */
     2569    return variable_buffer_output (o, "", 0);       /* eq */
    25702570  if (!var1->recursive && !var2->recursive)
    25712571  {
    25722572    if (    var1->value_length == var2->value_length
    25732573        &&  !memcmp (var1->value, var2->value, var1->value_length))
    2574       return variable_buffer_output (o, "", 1);     /* eq */
     2574      return variable_buffer_output (o, "", 0);     /* eq */
    25752575
    25762576    /* ignore trailing and leading blanks */
     
    25932593l_simple_compare:
    25942594    if (!memcmp (s1, s2, e1 - s1))
    2595       return variable_buffer_output (o, "", 1);     /* eq */
     2595      return variable_buffer_output (o, "", 0);     /* eq */
    25962596    return comp_vars_ne (o, s1, e1, s2, e2, argv[2], funcname);
    25972597  }
     
    26142614  /* both empty after stripping? */
    26152615  if (s1 == e1 && s2 == e2)
    2616     return variable_buffer_output (o, "", 1);       /* eq */
     2616    return variable_buffer_output (o, "", 0);       /* eq */
    26172617
    26182618  /* optimist. */
    26192619  if (   e1 - s1 == e2 - s2
    26202620      && !memcmp(s1, s2, e1 - s1))
    2621     return variable_buffer_output (o, "", 1);       /* eq */
     2621    return variable_buffer_output (o, "", 0);       /* eq */
    26222622
    26232623  /* compare up to the first '$' or the end. */
     
    27242724          error (NILF, _("$(%s): strptime(%s,%s,) -> %s\n"), funcname,
    27252725                 argv[1], input_format, p ? p : "<null>");
    2726           return variable_buffer_output (o, "", 1);
     2726          return variable_buffer_output (o, "", 0);
    27272727        }
    27282728    }
     
    29082908    }
    29092909
    2910   return variable_buffer_output (o, "", 1);
     2910  return variable_buffer_output (o, "", 0);
    29112911}
    29122912#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette