Abstract model more - break 'make check'
[centaur.git] / src / model / check.c
index 2c8c67ebf757ab38060975e8409317c7938cd01d..6dc06948f0143143625a7e0c30c4b3b0d28e87bd 100644 (file)
@@ -61,14 +61,14 @@ int elfu_mCheck(ElfuElf *me)
     sortedSecs[i] = ms;
     i++;
   }
-  assert(i = numSecs);
+  assert(i == numSecs);
 
   qsort(sortedSecs, numSecs, sizeof(*sortedSecs), cmpScnOffs);
 
 
   /* Check for overlapping sections */
   for (i = 0; i < numSecs - 1; i++) {
-    if (sortedSecs[i]->shdr.sh_offset + elfu_gScnSizeFile(&sortedSecs[i]->shdr)
+    if (sortedSecs[i]->shdr.sh_offset + SCNFILESIZE(&sortedSecs[i]->shdr)
         > sortedSecs[i+1]->shdr.sh_offset) {
       ELFU_WARN("elfu_check: Found overlapping sections: %s and %s.\n",
                 elfu_mScnName(me, sortedSecs[i]),
@@ -89,7 +89,7 @@ int elfu_mCheck(ElfuElf *me)
   /* Check for sections overlapping with PHDRs */
   for (i = 0; i < numSecs; i++) {
     if (isOverlapping(sortedSecs[i]->shdr.sh_offset,
-                      elfu_gScnSizeFile(&sortedSecs[i]->shdr),
+                      SCNFILESIZE(&sortedSecs[i]->shdr),
                       me->ehdr.e_phoff,
                       me->ehdr.e_phentsize * me->ehdr.e_phnum)) {
       ELFU_WARN("elfu_check: Found section overlapping with PHDRs: %s.\n",