Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ext/session/mod_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ typedef struct {
zend_string *last_key;
zend_string *basedir;
size_t dirdepth;
size_t st_size;
off_t st_size;
int filemode;
int fd;
} ps_files;
Expand Down Expand Up @@ -226,7 +226,7 @@ static void ps_files_open(ps_files *data, /* const */ zend_string *key)

static zend_result ps_files_write(ps_files *data, zend_string *key, zend_string *val)
{
size_t n = 0;
ssize_t n = 0;

/* PS(id) may be changed by calling session_regenerate_id().
Re-initialization should be tried here. ps_files_open() checks
Expand Down Expand Up @@ -266,7 +266,7 @@ static zend_result ps_files_write(ps_files *data, zend_string *key, zend_string
#endif

if (n != ZSTR_LEN(val)) {
if (n == (size_t)-1) {
if (n == -1) {
php_error_docref(NULL, E_WARNING, "Write failed: %s (%d)", strerror(errno), errno);
} else {
php_error_docref(NULL, E_WARNING, "Write wrote less bytes than requested");
Expand Down Expand Up @@ -489,7 +489,7 @@ PS_READ_FUNC(files)
return SUCCESS;
}

*val = zend_string_alloc(sbuf.st_size, false);
*val = zend_string_alloc((size_t)sbuf.st_size, false);

#ifdef HAVE_PREAD
n = pread(data->fd, ZSTR_VAL(*val), ZSTR_LEN(*val), 0);
Expand Down
4 changes: 2 additions & 2 deletions ext/session/mod_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ const ps_module ps_mod_user = {
};


static void ps_call_handler(zval *func, int argc, zval *argv, zval *retval)
static void ps_call_handler(zval *func, uint32_t argc, zval *argv, zval *retval)
{
int i;
uint32_t i;
if (PS(in_save_handler)) {
PS(in_save_handler) = false;
ZVAL_UNDEF(retval);
Expand Down
Loading