Fix compilation on FreeBSD.
[osl.git] / fsck.c
diff --git a/fsck.c b/fsck.c
index 27004a65694131b020d527177a9269ec2711f2ed..68e31078892e08edcd4fc7e193b5ebdbd9ccf54f 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -407,13 +407,8 @@ static int check_index_ranges(struct osl_table *t)
                                continue;
                        ret = check_range(t, i, j);
                        if (ret < 0) {
-                               if (ret != -E_OSL_INVALID_OBJECT &&
-                                               ret != -E_FSCK_RANGE_VIOLATION)
+                               if (ret != -E_FSCK_RANGE_VIOLATION)
                                        goto err;
-                               if (ret == -E_OSL_INVALID_OBJECT) {
-                                       CRIT_LOG("row %d, col %d maps to an "
-                                               "invalid object\n", i, j);
-                               }
                                ret = mark_row_invalid(t, i);
                                if (ret < 0)
                                        goto err;
@@ -517,14 +512,9 @@ static int check_for_invalid_objects(struct osl_table *t, uint32_t **lost_bytes)
                for (j = 0; j < t->num_rows; j++) {
                        struct osl_object obj;
                        ret = get_mapped_object(t, i, j, &obj);
-                       if (ret >= 0) {
-                               loss[i] -= obj.size + 1; /* add one for header byte */
-                               continue;
-                       }
-                       if (ret != -E_OSL_INVALID_OBJECT)
+                       if (ret < 0)
                                goto err;
-                       CRIT_LOG("row %d, col %d points to an invalid "
-                               "mapped object, bad\n", j, i);
+                       loss[i] -= obj.size;
                }
        }
        ret = 0;