jtag: retire jtag_alloc_in_value32 API
[fw/openocd] / src / target / arm.h
index ce8cbe193e8bf2bfdd3d2e259668ec1b9b5bf0ec..63932e117ee8abb1b46f0c8406a7066d229b8f9b 100644 (file)
@@ -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 {