summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
-rw-r--r--external/gard/gard.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c
index 9505293d..0c8ac47e 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -182,9 +182,9 @@ static const char *path_type_to_str(enum path_type t)
return "Unknown";
}
-static bool is_valid_id(uint32_t record_id)
+static bool is_valid_record(struct gard_record *g)
{
- return record_id != CLEARED_RECORD_ID;
+ return be32toh(g->record_id) != CLEARED_RECORD_ID;
}
static int do_iterate(struct gard_ctx *ctx,
@@ -246,7 +246,7 @@ static int count_valid_records_i(struct gard_ctx *ctx, int pos, struct gard_reco
if (!gard || !priv)
return -1;
- if (is_valid_id(be32toh(gard->record_id)))
+ if (is_valid_record(gard))
(*(int *)priv)++;
return 0;
@@ -272,7 +272,7 @@ static int do_list_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, vo
if (!gard)
return -1;
- if (is_valid_id(be32toh(gard->record_id)))
+ if (is_valid_record(gard))
printf("| %08x | %08x | %-15s |\n", be32toh(gard->record_id), be32toh(gard->errlog_eid),
path_type_to_str(gard->target_id.type_size >> PATH_TYPE_SHIFT));
OpenPOWER on IntegriCloud