Skip to contentSkip to conversation

time: posix-timers: Remove unnecessary ‘0’ values from error

PATCH New Li zeming 1 participant 1 message Jun 26, 2023 Posix clocks and timers

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 time: posix-timers: Remove unnecessary ‘0’ values from error

error is assigned first, so it does not need to initialize the assignment.

---
 kernel/time/posix-timers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/posix-timers.c +1 -1
index 808a247205a9..4e9a1676101b 100644
@@ -906,7 +906,7 @@ static int do_timer_settime(timer_t timer_id, int tmr_flags,
 	const struct k_clock *kc;
 	struct k_itimer *timr;
 	unsigned long flags;
-	int error = 0;
+	int error;
 
 	if (!timespec64_valid(&new_spec64->it_interval) ||
 	    !timespec64_valid(&new_spec64->it_value))
Signature · 1 line
2.18.2