{
int d = repo->start - p;
b = sat_extend(b, n, d, size, REPO_SIDEDATA_BLOCK);
- memmove((char*)b + d * size, b, n * size);
+ memmove((char *)b + d * size, b, n * size);
memset(b, 0, d * size);
n += d;
}
{
int d = p + count - repo->end;
b = sat_extend(b, n, d, size, REPO_SIDEDATA_BLOCK);
- memset((char*)b + n * size, 0, d * size);
+ memset((char *)b + n * size, 0, d * size);
}
return b;
}
}
}
-static const char* findKernelFlavor(Parsedata *pd, Solvable *s)
+static const char *findKernelFlavor(Parsedata *pd, Solvable *s)
{
Pool *pool = pd->pool;
-
- Id pid, *pidp = 0;
+ Id pid, *pidp;
if (s->provides)
{
- for (pidp = pd->repo->idarraydata + s->provides; pidp && (pid = *pidp++) != 0; )
+ pidp = pd->repo->idarraydata + s->provides;
+ while ((pid = *pidp++) != 0)
{
Reldep *prd;
const char *depname;
continue; /* wrong provides name */
prd = GETRELDEP(pool, pid);
depname = id2str(pool, prd->name);
- if (!strncmp(depname, "kernel-", strlen("kernel-")))
- {
- return depname + strlen("kernel-");
- }
+ if (!strncmp(depname, "kernel-", 7))
+ return depname + 7;
}
}
- if (!s->requires)
- return 0;
-
- for (pidp = pd->repo->idarraydata + s->requires ; pidp && (pid = *pidp++) != 0; )
+ if (s->requires)
{
- const char *depname = 0;
-
- if (!ISRELDEP(pid))
- {
- depname = id2str(pool, pid);
- }
- else
+ pidp = pd->repo->idarraydata + s->requires;
+ while ((pid = *pidp++) != 0)
{
- Reldep *prd = GETRELDEP(pool, pid);
- depname = id2str(pool, prd->name);
- }
- if (!strncmp(depname, "kernel-", strlen("kernel-")))
- {
- return depname + strlen("kernel-");
+ const char *depname;
+
+ if (!ISRELDEP(pid))
+ {
+ depname = id2str(pool, pid);
+ }
+ else
+ {
+ Reldep *prd = GETRELDEP(pool, pid);
+ depname = id2str(pool, prd->name);
+ }
+ if (!strncmp(depname, "kernel-", 7))
+ return depname + 7;
}
}
Pool *pool = pd->pool;
Solvable *s = pd->solvable;
Id evr;
- unsigned int t=0;
+ unsigned int t = 0;
if (pd->depth != pd->statedepth)
{