VirtualBox

Changeset 1617 in kBuild for trunk


Ignore:
Timestamp:
May 12, 2008 5:07:26 PM (17 years ago)
Author:
bird
Message:

Don't append empty strings to variables. (foo +=)

Location:
trunk/src/kmk
Files:
2 edited

Legend:

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

    r1610 r1617  
    616616    /* fast path */
    617617    append_string_to_variable (v,value, value_len, append);
    618   else
     618  else if (value_len)
    619619    {
    620620      unsigned int off_dollar = p - (char *)value;
     
    662662      restore_variable_buffer (saved_buffer, saved_buffer_length);
    663663    }
     664  /* else: Drop empty strings. Use $(NO_SUCH_VARIABLE) if a space is wanted. */
    664665}
    665666#endif /* CONFIG_WITH_VALUE_LENGTH */
  • trunk/src/kmk/variable.c

    r1610 r1617  
    16011601  int done_1st_prepend_copy = 0;
    16021602
     1603  /* Drop empty strings. Use $(NO_SUCH_VARIABLE) if a space is wanted. */
     1604  if (!value_len)
     1605      return;
     1606
    16031607  /* adjust the size. */
    16041608  if ((unsigned)v->value_alloc_len <= new_value_len + 1)
Note: See TracChangeset for help on using the changeset viewer.

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