}
static void
-commit_diskusage (struct parsedata *pd, unsigned handle)
+commit_diskusage (struct parsedata *pd, Id handle)
{
- unsigned i;
+ int i;
Dirpool *dp = &pd->data->dirpool;
/* Now sort in dirid order. This ensures that parents come before
their children. */
the array moving to the start, hence seeing leafs before parents. */
for (i = pd->ndirs; i--;)
{
- unsigned p = dirpool_parent(dp, pd->dirs[i][0]);
- unsigned j = i;
+ Id p = dirpool_parent(dp, pd->dirs[i][0]);
+ int j = i;
for (; p; p = dirpool_parent(dp, p))
{
for (; j--;)
if (pd->dirs[j][0] == p)
break;
- if (j < pd->ndirs)
+ if (j >= 0)
{
if (pd->dirs[j][1] < pd->dirs[i][1])
pd->dirs[j][1] = 0;
case STATE_DIR:
{
long filesz = 0, filenum = 0;
- unsigned dirid;
+ Id dirid;
if ((str = find_attr("name", atts)) != 0)
dirid = repodata_str2dir(pd->data, str, 1);
else
char *sp[6];
long filesz;
long filenum;
- unsigned dirid;
+ Id dirid;
if (split(line, sp, 6) != 5)
return;
pd->dirs = solv_extend(pd->dirs, pd->ndirs, 1, sizeof(pd->dirs[0]), 31);
static void
commit_diskusage(struct parsedata *pd, Id handle)
{
- unsigned i;
+ int i;
Dirpool *dp = &pd->data->dirpool;
/* Now sort in dirid order. This ensures that parents come before
their children. */
the array moving to the start, hence seeing leafs before parents. */
for (i = pd->ndirs; i--;)
{
- unsigned p = dirpool_parent(dp, pd->dirs[i][0]);
- unsigned j = i;
+ Id p = dirpool_parent(dp, pd->dirs[i][0]);
+ int j = i;
for (; p; p = dirpool_parent(dp, p))
{
for (; j--;)
if (pd->dirs[j][0] == p)
break;
- if (j < pd->ndirs)
+ if (j >= 0)
{
if (pd->dirs[j][1] < pd->dirs[i][1])
pd->dirs[j][1] = 0;
case CTAG('=', 'V', 'i', 's'):
{
/* Accept numbers and textual bools. */
- unsigned k;
+ int k;
k = atoi(line + 6);
if (k || !strcasecmp(line + 6, "true"))
repodata_set_void(data, handle, SOLVABLE_ISVISIBLE);
last_found = 0;
for (i = 0; i < pd.nshare; i++)
{
- unsigned n, nn;
+ unsigned int n, nn;
Solvable *found = 0;
if (!pd.share_with[i].name)
continue;