aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/target/arm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/target/arm.h b/src/target/arm.h
index ce8cbe19..63932e11 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -176,12 +176,14 @@ struct arm {
/** Convert target handle to generic ARM target state handle. */
static inline struct arm *target_to_arm(struct target *target)
{
+ assert(target != NULL);
return target->arch_info;
}
static inline bool is_arm(struct arm *arm)
{
- return arm && arm->common_magic == ARM_COMMON_MAGIC;
+ assert(arm != NULL);
+ return arm->common_magic == ARM_COMMON_MAGIC;
}
struct arm_algorithm {