case 'R':
if (strcasecmp(field, "Replaces") == 0) {
ab_pkg = pkg_get_ptr(pkg, PKG_REPLACES);
- if (ab_pkg && *ab_pkg) {
+ if (ab_pkg && ab_pkg[0]) {
fprintf(fp, "Replaces:");
- for (i = 0; *ab_pkg; i++, ab_pkg++) {
+ for (i = 0; ab_pkg[i]; i++) {
fprintf(fp, "%s %s", i == 0 ? "" : ",",
- (*ab_pkg)->name);
+ ab_pkg[i]->name);
}
fprintf(fp, "\n");
}
abstract_pkg_vec_insert(ab_pkg->provided_by, ab_pkg);
- for (count = 1, item = strtok_r(list, ", ", &tok);
- item;
- count++, item = strtok_r(NULL, ", ", &tok), count++) {
+ for (count = 1, item = strtok_r(list, ", ", &tok); item;
+ count++, item = strtok_r(NULL, ", ", &tok)) {
tmp = realloc(replaces, sizeof(abstract_pkg_t *) * (count + 1));
if (!tmp)