Skip to content

Commit 8af4e80

Browse files
committed
ext/opcache: formalize return type of accel_restart_is_active() to bool
1 parent a8cc04d commit 8af4e80

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ext/opcache/ZendAccelerator.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static inline void accel_restart_leave(void)
312312
#endif
313313
}
314314

315-
static inline int accel_restart_is_active(void)
315+
static inline bool accel_restart_is_active(void)
316316
{
317317
if (ZCSG(restart_in_progress)) {
318318
#ifndef ZEND_WIN32
@@ -325,19 +325,19 @@ static inline int accel_restart_is_active(void)
325325

326326
if (fcntl(lock_file, F_GETLK, &restart_check) == -1) {
327327
zend_accel_error(ACCEL_LOG_DEBUG, "RestartC: %s (%d)", strerror(errno), errno);
328-
return FAILURE;
328+
return true;
329329
}
330330
if (restart_check.l_type == F_UNLCK) {
331331
ZCSG(restart_in_progress) = false;
332-
return 0;
332+
return false;
333333
} else {
334-
return 1;
334+
return true;
335335
}
336336
#else
337337
return LOCKVAL(restart_in) != 0;
338338
#endif
339339
}
340-
return 0;
340+
return false;
341341
}
342342

343343
/* Creates a read lock for SHM access */

0 commit comments

Comments
 (0)