VirtualBox

Changeset 1999 in kBuild for trunk/src


Ignore:
Timestamp:
Oct 29, 2008 9:47:00 PM (17 years ago)
Author:
bird
Message:

variaiable::value_length -> unsigned int.

Location:
trunk/src/kmk
Files:
5 edited

Legend:

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

    r1993 r1999  
    296296
    297297#ifdef CONFIG_WITH_VALUE_LENGTH
    298   assert ((unsigned int)v->value_length == strlen (v->value));
     298  assert (v->value_length == strlen (v->value));
    299299  if (!v->recursive)
    300300    o = variable_buffer_output (o, v->value, v->value_length);
     
    981981    buf = variable_buffer_output (buf, " ", 1);
    982982#ifdef CONFIG_WITH_VALUE_LENGTH
    983   assert ((unsigned int)v->value_length == strlen (v->value)); /* FIXME */
     983  assert (v->value_length == strlen (v->value));
    984984#endif
    985985
  • trunk/src/kmk/function.c

    r1997 r1999  
    17621762  if (v)
    17631763#ifdef CONFIG_WITH_VALUE_LENGTH
    1764     o = variable_buffer_output (o, v->value,
    1765                                 v->value_length >= 0
    1766                                 ? (unsigned int)v->value_length /* FIXME */
    1767                                 : strlen(v->value));
     1764    {
     1765      assert (v->value_length == strlen (v->value));
     1766      o = variable_buffer_output (o, v->value, v->value_length);
     1767    }
    17681768#else
    17691769    o = variable_buffer_output (o, v->value, strlen(v->value));
  • trunk/src/kmk/kbuild.c

    r1998 r1999  
    654654        assert(!pVar->rdonly_val);
    655655#endif
    656         kbuild_apply_defpath(pDefPath, &pVar->value, (unsigned int *)&pVar->value_length, &pVar->value_alloc_len, 1);
     656        kbuild_apply_defpath(pDefPath, &pVar->value, &pVar->value_length, &pVar->value_alloc_len, 1);
    657657    }
    658658    return pVar;
     
    678678        assert(!pVar->rdonly_val);
    679679#endif
    680         kbuild_apply_defpath(pDefPath, &pVar->value, (unsigned int *)&pVar->value_length, &pVar->value_alloc_len, 1);
     680        kbuild_apply_defpath(pDefPath, &pVar->value, &pVar->value_length, &pVar->value_alloc_len, 1);
    681681    }
    682682    return pVar;
     
    20682068        assert(!pSource->rdonly_val);
    20692069#endif
    2070         kbuild_apply_defpath(pDefPath, &pSource->value, (unsigned int *)&pSource->value_length, &pSource->value_alloc_len, 1 /* can free */);
     2070        kbuild_apply_defpath(pDefPath, &pSource->value, &pSource->value_length, &pSource->value_alloc_len, 1 /* can free */);
    20712071    }
    20722072
  • trunk/src/kmk/variable.c

    r1997 r1999  
    13781378  if (*v->value == '\0' || v->origin == o_env || v->origin == o_env_override)
    13791379    {
    1380 #ifdef CONFIG_WITH_RDONLY_VARIABLE_VALUE
     1380# ifdef CONFIG_WITH_RDONLY_VARIABLE_VALUE
    13811381      if (v->rdonly_val)
    13821382        v->rdonly_val = 0;
    13831383      else
    1384 #endif
     1384# endif
    13851385        free (v->value);
    13861386      v->origin = o_file;
    13871387      v->value = xstrdup (default_shell);
    1388 #ifdef CONFIG_WITH_VALUE_LENGTH
     1388# ifdef CONFIG_WITH_VALUE_LENGTH
    13891389      v->value_length = strlen (v->value);
    13901390      v->value_alloc_len = v->value_length + 1;
    1391 #endif
     1391# endif
    13921392    }
    13931393#endif
     
    22532253    return 0;
    22542254
    2255   vp = do_variable_definition_2 (flocp, v.name, v.value,
    2256                                  v.value_length != -1 ? (unsigned int)v.value_length : ~0U, /* FIXME */
     2255  vp = do_variable_definition_2 (flocp, v.name, v.value, v.value_length,
    22572256                                 0, NULL, origin, v.flavor, target_var);
    22582257#endif
  • trunk/src/kmk/variable.h

    r1997 r1999  
    6767    int length;                 /* strlen (name) */
    6868#ifdef CONFIG_WITH_VALUE_LENGTH
    69     int value_length;           /* The length of the value, usually unused.  */
     69    unsigned int value_length;  /* The length of the value.  */
    7070    unsigned int value_alloc_len; /* The amount of memory we've actually allocated. */
    7171    /* FIXME: make lengths unsigned! */
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