Skip to content

Commit 196499e

Browse files
committed
cleanup: remove useless indents
1 parent 9490d0c commit 196499e

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

ext/random/engine_mt19937.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static bool serialize(php_random_status *status, HashTable *data)
189189
zend_hash_next_index_insert(data, &t);
190190
ZVAL_LONG(&t, s->mode);
191191
zend_hash_next_index_insert(data, &t);
192-
192+
193193
return true;
194194
}
195195

@@ -207,7 +207,7 @@ static bool unserialize(php_random_status *status, HashTable *data)
207207
return false;
208208
}
209209
}
210-
t = zend_hash_index_find(data, MT_N);
210+
t = zend_hash_index_find(data, MT_N);
211211
if (!t || Z_TYPE_P(t) != IS_LONG) {
212212
return false;
213213
}

ext/random/engine_pcgoneseq128xslrr64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static bool serialize(php_random_status *status, HashTable *data)
7070
u = php_random_uint128_hi(s->state);
7171
ZVAL_STR(&z, php_random_bin2hex_le(&u, sizeof(uint64_t)));
7272
zend_hash_next_index_insert(data, &z);
73-
73+
7474
u = php_random_uint128_lo(s->state);
7575
ZVAL_STR(&z, php_random_bin2hex_le(&u, sizeof(uint64_t)));
7676
zend_hash_next_index_insert(data, &z);

ext/random/engine_xoshiro256starstar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static inline void seed256(php_random_status *status, uint64_t s0, uint64_t s1,
9595
static void seed(php_random_status *status, uint64_t seed)
9696
{
9797
uint64_t s[4];
98-
98+
9999
s[0] = splitmix64(&seed);
100100
s[1] = splitmix64(&seed);
101101
s[2] = splitmix64(&seed);
@@ -215,7 +215,7 @@ PHP_METHOD(Random_Engine_Xoshiro256StarStar, __construct)
215215
/* char (byte: 8 bit) * 32 = 256 bits */
216216
if (ZSTR_LEN(str_seed) == 32) {
217217
uint64_t t[4];
218-
218+
219219
/* Endianness safe copy */
220220
for (uint32_t i = 0; i < 4; i++) {
221221
t[i] = 0;

ext/random/php_random.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ static inline php_random_uint128_t php_random_uint128_multiply(php_random_uint12
183183

184184
static inline uint64_t php_random_pcgoneseq128xslrr64_rotr64(php_random_uint128_t num)
185185
{
186-
const uint64_t
186+
const uint64_t
187187
v = ((uint64_t) (num >> 64U)) ^ (uint64_t) num,
188188
s = num >> 122U;
189-
189+
190190
return (v >> s) | (v << ((-s) & 63));
191191
}
192192
# endif

ext/random/random.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static inline uint32_t rand_range32(const php_random_algo *algo, php_random_stat
125125
status->last_unsafe = true;
126126
return 0;
127127
}
128-
128+
129129
result = algo->generate(status);
130130
total_size = status->last_generated_size;
131131
if (status->last_unsafe) {
@@ -187,7 +187,7 @@ static inline uint64_t rand_range64(const php_random_algo *algo, php_random_stat
187187
status->last_unsafe = true;
188188
return 0;
189189
}
190-
190+
191191
result = algo->generate(status);
192192
total_size = status->last_generated_size;
193193
if (status->last_unsafe) {
@@ -847,7 +847,7 @@ PHP_MINIT_FUNCTION(random)
847847

848848
RANDOM_G(mt19937) = php_random_status_alloc(&php_random_algo_mt19937, true);
849849
RANDOM_G(mt19937_seeded) = false;
850-
850+
851851
return SUCCESS;
852852
}
853853
/* }}} */
@@ -862,7 +862,7 @@ PHP_MSHUTDOWN_FUNCTION(random)
862862

863863
php_random_status_free(RANDOM_G(combined_lcg), true);
864864
RANDOM_G(combined_lcg) = NULL;
865-
865+
866866
php_random_status_free(RANDOM_G(mt19937), true);
867867
RANDOM_G(mt19937) = NULL;
868868

ext/random/randomizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static inline void randomizer_common_init(php_random_randomizer *randomizer, zen
3131
if (engine_object->ce->type == ZEND_INTERNAL_CLASS) {
3232
/* Internal classes always php_random_engine struct */
3333
php_random_engine *engine = php_random_engine_from_obj(engine_object);
34-
34+
3535
/* Copy engine pointers */
3636
randomizer->algo = engine->algo;
3737
randomizer->status = engine->status;

ext/standard/array.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2978,7 +2978,7 @@ PHPAPI bool php_array_data_shuffle(const php_random_algo *algo, php_random_statu
29782978
hash->nNumUsed = n_elems;
29792979
hash->nInternalPointer = 0;
29802980
hash->nNextFreeElement = n_elems;
2981-
2981+
29822982
return true;
29832983
}
29842984
/* }}} */
@@ -5883,7 +5883,7 @@ PHPAPI bool php_array_pick_keys(const php_random_algo *algo, php_random_status *
58835883
return false;
58845884
}
58855885

5886-
/* Make the return value an array only if we need to pass back more than one result. */
5886+
/* Make the return value an array only if we need to pass back more than one result. */
58875887
array_init_size(retval, (uint32_t) num_req);
58885888
if (num_req > (num_avail >> 1)) {
58895889
negative_bitset = 1;
@@ -5939,11 +5939,11 @@ PHP_FUNCTION(array_rand)
59395939
ZEND_PARSE_PARAMETERS_END();
59405940

59415941
if (!php_array_pick_keys(
5942-
php_random_default_algo(),
5943-
php_random_default_status(),
5944-
input,
5945-
num_req,
5946-
return_value,
5942+
php_random_default_algo(),
5943+
php_random_default_status(),
5944+
input,
5945+
num_req,
5946+
return_value,
59475947
false)
59485948
) {
59495949
RETURN_THROWS();

ext/standard/string.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5781,9 +5781,9 @@ PHP_FUNCTION(str_shuffle)
57815781
RETVAL_STRINGL(ZSTR_VAL(arg), ZSTR_LEN(arg));
57825782
if (Z_STRLEN_P(return_value) > 1) {
57835783
php_binary_string_shuffle(
5784-
php_random_default_algo(),
5785-
php_random_default_status(),
5786-
Z_STRVAL_P(return_value),
5784+
php_random_default_algo(),
5785+
php_random_default_status(),
5786+
Z_STRVAL_P(return_value),
57875787
Z_STRLEN_P(return_value)
57885788
);
57895789
}

0 commit comments

Comments
 (0)