Move type regression test back to asserts
authorJindrich Novy <jnovy@redhat.com>
Thu, 18 Sep 2008 12:57:52 +0000 (14:57 +0200)
committerJindrich Novy <jnovy@redhat.com>
Thu, 18 Sep 2008 12:58:39 +0000 (14:58 +0200)
- no need to bother with message translations in this case

build/rpmfc.c

index 1f139b4..24a7992 100644 (file)
@@ -1718,30 +1718,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
 
     /* Add dependency dictionary(#dependencies) */
     if (rpmtdFromArgi(&td, RPMTAG_DEPENDSDICT, fc->ddictx)) {
-       if (rpmtdType(&td) != RPM_INT32_TYPE) {
-           rc = RPMRC_FAIL;
-           rpmlog(rc, _("Container not of 32bit data type.\n"));
-           goto exit;
-       }
+       assert(rpmtdType(&td) == RPM_INT32_TYPE);
        headerPut(pkg->header, &td, HEADERPUT_DEFAULT);
     }
 
     /* Add per-file dependency (start,number) pairs (#files) */
     if (rpmtdFromArgi(&td, RPMTAG_FILEDEPENDSX, fc->fddictx)) {
-       if (rpmtdType(&td) != RPM_INT32_TYPE) {
-           rc = RPMRC_FAIL;
-           rpmlog(rc, _("Container not of 32bit data type.\n"));
-           goto exit;
-       }
+       assert(rpmtdType(&td) == RPM_INT32_TYPE);
        headerPut(pkg->header, &td, HEADERPUT_DEFAULT);
     }
 
     if (rpmtdFromArgi(&td, RPMTAG_FILEDEPENDSN, fc->fddictn)) {
-       if (rpmtdType(&td) != RPM_INT32_TYPE) {
-           rc = RPMRC_FAIL;
-           rpmlog(rc, _("Container not of 32bit data type.\n"));
-           goto exit;
-       }
+       assert(rpmtdType(&td) == RPM_INT32_TYPE);
        headerPut(pkg->header, &td, HEADERPUT_DEFAULT);
     }