- int32_t cnt[3];
- struct DepSet buildreqs = { 0,0,0,0 };
- struct DepSet conflicts = { 0,0,0,0 };
-
- if (headerGetEntry(h, RPMTAG_REQUIREFLAGS, 0, (void**)&buildreqs.flags, cnt+0) &&
- headerGetEntry(h, RPMTAG_REQUIRENAME, 0, (void**)&buildreqs.name, cnt+1) &&
- headerGetEntry(h, RPMTAG_REQUIREVERSION, 0, (void**)&buildreqs.version, cnt+2)) {
- assert(cnt[0]==cnt[1] && cnt[1]==cnt[2]);
- buildreqs.cnt = cnt[0];
+ struct DepSet buildreqs;
+ struct DepSet conflicts;
+
+ buildreqs.flags = rpmtdNew();
+ buildreqs.name = rpmtdNew();
+ buildreqs.version = rpmtdNew();
+ buildreqs.cnt = 0;
+
+ if (headerGet(h, RPMTAG_REQUIREFLAGS, buildreqs.flags, 0) &&
+ headerGet(h, RPMTAG_REQUIRENAME, buildreqs.name, 0) &&
+ headerGet(h, RPMTAG_REQUIREVERSION, buildreqs.version, 0)) {
+ assert(buildreqs.flags->count==buildreqs.name->count && buildreqs.name->count==buildreqs.version->count);
+ buildreqs.cnt = buildreqs.flags->count;