Skip to content

Commit 2c49277

Browse files
committed
cleanup
1 parent e20be74 commit 2c49277

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

Zend/zend_execute_API.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@ void init_executor(void) /* {{{ */
175175
EG(timed_out) = 0;
176176
#ifdef ZEND_TIMER
177177
zend_timer_create();
178-
/*EG(timer) = (timer_t){0};
179-
EG(oldact) = (struct sigaction){0};*/
180178
#endif
181179

182180
EG(exception) = NULL;

Zend/zend_timer.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ ZEND_API void zend_timer_settime(zend_long seconds) /* {{{ }*/
6565
{
6666
timer_t timer = EG(timer);
6767

68-
if (timer == (timer_t){0}) {
69-
zend_error_noreturn(E_ERROR, "Timer not created");
70-
}
71-
7268
struct itimerspec its;
7369
its.it_value.tv_sec = seconds;
7470
its.it_value.tv_nsec = its.it_interval.tv_sec = its.it_interval.tv_nsec = 0;
@@ -86,14 +82,6 @@ ZEND_API void zend_timer_settime(zend_long seconds) /* {{{ }*/
8682
ZEND_API void zend_timer_delete(void) /* {{{ */
8783
{
8884
timer_t timer = EG(timer);
89-
if (timer == (timer_t){0}) {
90-
/* Don't trigger an error here because the timer may not be initialized when PHP fail early, and on threads created by PHP but not managed by it. */
91-
# ifdef TIMER_DEBUG
92-
fprintf(stderr, "Could not delete timer that has not been created on thread %d\n", (uintmax_t) timer, (pid_t) syscall(SYS_gettid));
93-
# endif
94-
95-
return;
96-
}
9785

9886
# ifdef TIMER_DEBUG
9987
fprintf(stderr, "Deleting timer %#jx on thread %d...\n", (uintmax_t) timer, (pid_t) syscall(SYS_gettid));

0 commit comments

Comments
 (0)