From c801901c992ca632a0beb1eeb78b42c910e2e0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85strand?= Date: Mon, 28 Sep 2020 08:44:42 +0200 Subject: Don't use NULL for integer variables Avoid using NULL to initialize and compare with for integer variables. Change-Id: I1c370a9bb213dc93db845149d123915273411551 --- src/ethosu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ethosu_device.c') diff --git a/src/ethosu_device.c b/src/ethosu_device.c index ba7e0d5..973caad 100644 --- a/src/ethosu_device.c +++ b/src/ethosu_device.c @@ -531,7 +531,7 @@ enum ethosu_error_codes ethosu_set_clock_and_power(struct ethosu_device *dev, uint32_t ethosu_read_reg(struct ethosu_device *dev, uint32_t address) { #if !defined(ARM_NPU_STUB) - ASSERT(dev->base_address != NULL); + ASSERT(dev->base_address != 0); volatile uint32_t *reg = (uint32_t *)(uintptr_t)(dev->base_address + address); return *reg; @@ -546,7 +546,7 @@ uint32_t ethosu_read_reg(struct ethosu_device *dev, uint32_t address) void ethosu_write_reg(struct ethosu_device *dev, uint32_t address, uint32_t value) { #if !defined(ARM_NPU_STUB) - ASSERT(dev->base_address != NULL); + ASSERT(dev->base_address != 0); volatile uint32_t *reg = (uint32_t *)(uintptr_t)(dev->base_address + address); *reg = value; -- cgit v1.2.1