Skip to content

Commit 7b16f81

Browse files
thg2kGirgias
authored andcommitted
ext/session: code cleanup - use tab for indent
1 parent db37779 commit 7b16f81

3 files changed

Lines changed: 30 additions & 30 deletions

File tree

ext/session/mod_files.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static void ps_files_open(ps_files *data, /* const */ zend_string *key)
153153
{
154154
char buf[MAXPATHLEN];
155155
#if !defined(O_NOFOLLOW) || !defined(PHP_WIN32)
156-
struct stat sbuf = {0};
156+
struct stat sbuf = {0};
157157
#endif
158158
int ret;
159159

@@ -230,7 +230,7 @@ static zend_result ps_files_write(ps_files *data, zend_string *key, zend_string
230230

231231
/* PS(id) may be changed by calling session_regenerate_id().
232232
Re-initialization should be tried here. ps_files_open() checks
233-
data->last_key and reopen when it is needed. */
233+
data->last_key and reopen when it is needed. */
234234
ps_files_open(data, key);
235235
if (data->fd < 0) {
236236
return FAILURE;

ext/session/mod_user.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ static zend_result verify_bool_return_type_userland_calls(const zval* value)
7575
}
7676
if (!EG(exception)) {
7777
zend_type_error("Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value)); \
78-
}
79-
return FAILURE;
78+
}
79+
return FAILURE;
8080
}
8181

8282
PS_OPEN_FUNC(user)

ext/session/session.c

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ static void php_session_track_init(void)
267267
static zend_string *php_session_encode(void)
268268
{
269269
IF_SESSION_VARS() {
270-
ZEND_ASSERT(PS(serializer));
270+
ZEND_ASSERT(PS(serializer));
271271
return PS(serializer)->encode();
272272
} else {
273273
php_error_docref(NULL, E_WARNING, "Cannot encode non-existent session");
@@ -284,7 +284,7 @@ static ZEND_COLD void php_session_cancel_decode(void)
284284

285285
static zend_result php_session_decode(const zend_string *data)
286286
{
287-
ZEND_ASSERT(PS(serializer));
287+
ZEND_ASSERT(PS(serializer));
288288
zend_result result = SUCCESS;
289289
zend_try {
290290
if (PS(serializer)->decode(ZSTR_VAL(data), ZSTR_LEN(data)) == FAILURE) {
@@ -786,38 +786,38 @@ static PHP_INI_MH(OnUpdateSidBits)
786786

787787
static PHP_INI_MH(OnUpdateSessionGcProbability)
788788
{
789-
SESSION_CHECK_ACTIVE_STATE;
790-
SESSION_CHECK_OUTPUT_STATE;
789+
SESSION_CHECK_ACTIVE_STATE;
790+
SESSION_CHECK_OUTPUT_STATE;
791791

792-
zend_long tmp = zend_ini_parse_quantity_warn(new_value, entry->name);
792+
zend_long tmp = zend_ini_parse_quantity_warn(new_value, entry->name);
793793

794-
if (tmp < 0) {
795-
php_error_docref("session.gc_probability", E_WARNING, "session.gc_probability must be greater than or equal to 0");
796-
return FAILURE;
797-
}
794+
if (tmp < 0) {
795+
php_error_docref("session.gc_probability", E_WARNING, "session.gc_probability must be greater than or equal to 0");
796+
return FAILURE;
797+
}
798798

799-
zend_long *p = ZEND_INI_GET_ADDR();
800-
*p = tmp;
799+
zend_long *p = ZEND_INI_GET_ADDR();
800+
*p = tmp;
801801

802-
return SUCCESS;
802+
return SUCCESS;
803803
}
804804

805805
static PHP_INI_MH(OnUpdateSessionDivisor)
806806
{
807-
SESSION_CHECK_ACTIVE_STATE;
808-
SESSION_CHECK_OUTPUT_STATE;
807+
SESSION_CHECK_ACTIVE_STATE;
808+
SESSION_CHECK_OUTPUT_STATE;
809809

810-
zend_long tmp = zend_ini_parse_quantity_warn(new_value, entry->name);
810+
zend_long tmp = zend_ini_parse_quantity_warn(new_value, entry->name);
811811

812-
if (tmp <= 0) {
813-
php_error_docref("session.gc_divisor", E_WARNING, "session.gc_divisor must be greater than 0");
814-
return FAILURE;
815-
}
812+
if (tmp <= 0) {
813+
php_error_docref("session.gc_divisor", E_WARNING, "session.gc_divisor must be greater than 0");
814+
return FAILURE;
815+
}
816816

817-
zend_long *p = ZEND_INI_GET_ADDR();
818-
*p = tmp;
817+
zend_long *p = ZEND_INI_GET_ADDR();
818+
*p = tmp;
819819

820-
return SUCCESS;
820+
return SUCCESS;
821821
}
822822

823823
static PHP_INI_MH(OnUpdateRfc1867Freq)
@@ -2399,10 +2399,10 @@ PHP_FUNCTION(session_create_id)
23992399
}
24002400

24012401
if (prefix && ZSTR_LEN(prefix)) {
2402-
if (ZSTR_LEN(prefix) > PS_MAX_SID_LENGTH) {
2403-
zend_argument_value_error(1, "cannot be longer than %d characters", PS_MAX_SID_LENGTH);
2404-
RETURN_THROWS();
2405-
}
2402+
if (ZSTR_LEN(prefix) > PS_MAX_SID_LENGTH) {
2403+
zend_argument_value_error(1, "cannot be longer than %d characters", PS_MAX_SID_LENGTH);
2404+
RETURN_THROWS();
2405+
}
24062406
if (php_session_valid_key(ZSTR_VAL(prefix)) == FAILURE) {
24072407
/* E_ERROR raised for security reason. */
24082408
php_error_docref(NULL, E_WARNING, "Prefix cannot contain special characters. Only the A-Z, a-z, 0-9, \"-\", and \",\" characters are allowed");

0 commit comments

Comments
 (0)