Skip to content

Commit 735edd1

Browse files
committed
Voidify php_sock_array_from_fd_set() as result is never used
1 parent 3eb9dd4 commit 735edd1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ext/sockets/sockets.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -526,14 +526,13 @@ static int php_sock_array_to_fd_set(uint32_t arg_num, zval *sock_array, fd_set *
526526
}
527527
/* }}} */
528528

529-
static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds) /* {{{ */
529+
static void php_sock_array_from_fd_set(zval *sock_array, fd_set *fds) /* {{{ */
530530
{
531531
zval *element;
532532
zval *dest_element;
533533
php_socket *php_sock;
534534
zval new_hash;
535-
int num = 0;
536-
zend_ulong num_key;
535+
zend_ulong num_key;
537536
zend_string *key;
538537

539538
ZEND_ASSERT(Z_TYPE_P(sock_array) == IS_ARRAY);
@@ -557,15 +556,12 @@ static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds) /* {{{ */
557556
Z_ADDREF_P(dest_element);
558557
}
559558
}
560-
num++;
561559
} ZEND_HASH_FOREACH_END();
562560

563561
/* Destroy old array, add new one */
564562
zval_ptr_dtor(sock_array);
565563

566564
ZVAL_COPY_VALUE(sock_array, &new_hash);
567-
568-
return num ? 1 : 0;
569565
}
570566
/* }}} */
571567

0 commit comments

Comments
 (0)