@@ -416,14 +416,14 @@ PHP_FUNCTION(posix_ctermid)
416
416
/* }}} */
417
417
418
418
/* Checks if the provides resource is a stream and if it provides a file descriptor */
419
- static int php_posix_stream_get_fd (zval * zfp , zend_long * fd ) /* {{{ */
419
+ static zend_result php_posix_stream_get_fd (zval * zfp , zend_long * fd ) /* {{{ */
420
420
{
421
421
php_stream * stream ;
422
422
423
423
php_stream_from_zval_no_verify (stream , zfp );
424
424
425
425
if (stream == NULL ) {
426
- return 0 ;
426
+ return FAILURE ;
427
427
}
428
428
429
429
/* get the fd.
@@ -437,9 +437,9 @@ static int php_posix_stream_get_fd(zval *zfp, zend_long *fd) /* {{{ */
437
437
} else {
438
438
php_error_docref (NULL , E_WARNING , "Could not use stream of type '%s'" ,
439
439
stream -> ops -> label );
440
- return 0 ;
440
+ return FAILURE ;
441
441
}
442
- return 1 ;
442
+ return SUCCESS ;
443
443
}
444
444
/* }}} */
445
445
@@ -459,7 +459,7 @@ PHP_FUNCTION(posix_ttyname)
459
459
ZEND_PARSE_PARAMETERS_END ();
460
460
461
461
if (Z_TYPE_P (z_fd ) == IS_RESOURCE ) {
462
- if (! php_posix_stream_get_fd (z_fd , & fd )) {
462
+ if (php_posix_stream_get_fd (z_fd , & fd ) == FAILURE ) {
463
463
RETURN_FALSE ;
464
464
}
465
465
} else {
@@ -520,7 +520,7 @@ PHP_FUNCTION(posix_isatty)
520
520
ZEND_PARSE_PARAMETERS_END ();
521
521
522
522
if (Z_TYPE_P (z_fd ) == IS_RESOURCE ) {
523
- if (! php_posix_stream_get_fd (z_fd , & fd )) {
523
+ if (php_posix_stream_get_fd (z_fd , & fd ) == FAILURE ) {
524
524
RETURN_FALSE ;
525
525
}
526
526
} else {
@@ -1044,7 +1044,7 @@ PHP_FUNCTION(posix_getpwuid)
1044
1044
#define UNLIMITED_STRING "unlimited"
1045
1045
1046
1046
/* {{{ posix_addlimit */
1047
- static int posix_addlimit (int limit , const char * name , zval * return_value ) {
1047
+ static zend_result posix_addlimit (int limit , const char * name , zval * return_value ) {
1048
1048
int result ;
1049
1049
struct rlimit rl ;
1050
1050
char hard [80 ];
@@ -1316,7 +1316,7 @@ PHP_FUNCTION(posix_fpathconf)
1316
1316
ZEND_PARSE_PARAMETERS_END ();
1317
1317
1318
1318
if (Z_TYPE_P (z_fd ) == IS_RESOURCE ) {
1319
- if (! php_posix_stream_get_fd (z_fd , & fd )) {
1319
+ if (php_posix_stream_get_fd (z_fd , & fd ) == FAILURE ) {
1320
1320
RETURN_FALSE ;
1321
1321
}
1322
1322
} else {
0 commit comments