remain = bytes = (size_t) retval;
for(i=0; i<iovcnt; i++) {
- len = (iov[i].iov_len < remain) ? iov[i].iov_len : remain;
+ len = ((unsigned int)iov[i].iov_len < remain) ? iov[i].iov_len : remain;
memcpy(iov[i].iov_base, buffer+pos, len);
pos += len;
remain -= len;
Returns the data held in the iovec specified by iovec_id[iovec_position] */
PHP_FUNCTION(socket_iovec_fetch)
{
- zval *iovec_id;
- php_iovec_t *vector;
- int iovec_position;
+ zval *iovec_id;
+ php_iovec_t *vector;
+ unsigned int iovec_position;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &iovec_id, &iovec_position) == FAILURE)
return;
Sets the data held in iovec_id[iovec_position] to new_val */
PHP_FUNCTION(socket_iovec_set)
{
- zval *iovec_id;
- php_iovec_t *vector;
- int iovec_position, new_val_len;
- char *new_val;
+ zval *iovec_id;
+ php_iovec_t *vector;
+ int new_val_len;
+ unsigned int iovec_position;
+ char *new_val;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rls", &iovec_id, &iovec_position, &new_val, &new_val_len) == FAILURE)
return;
zval *iovec_id;
php_iovec_t *vector;
struct iovec *vector_array;
- int i, iov_pos;
+ unsigned int i, iov_pos;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &iovec_id, &iov_pos) == FAILURE)
return;