Skip to content

Commit 877ccbf

Browse files
committed
Move declarations.
1 parent b04d683 commit 877ccbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/hash/hash.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ static void one_to_buffer(size_t sz, unsigned char *buf, uint64_t val) {
224224

225225
PHP_HASH_API int php_hash_serialize_spec(const php_hashcontext_object *hash, zval *zv, const char *spec) /* {{{ */
226226
{
227-
size_t pos = 0, max_alignment = 1, sz, count;
227+
size_t pos = 0, max_alignment = 1;
228228
unsigned char *buf = (unsigned char *) hash->context;
229229
zval tmp;
230230
array_init(zv);
231231
while (*spec != '\0' && *spec != '.') {
232232
char spec_ch = *spec;
233-
count = parse_serialize_spec(&spec, &pos, &sz, &max_alignment);
233+
size_t sz, count = parse_serialize_spec(&spec, &pos, &sz, &max_alignment);
234234
if (pos + count * sz > hash->ops->context_size) {
235235
return FAILURE;
236236
}
@@ -269,15 +269,15 @@ PHP_HASH_API int php_hash_serialize_spec(const php_hashcontext_object *hash, zva
269269

270270
PHP_HASH_API int php_hash_unserialize_spec(php_hashcontext_object *hash, const zval *zv, const char *spec) /* {{{ */
271271
{
272-
size_t pos = 0, max_alignment = 1, sz, count, j = 0;
272+
size_t pos = 0, max_alignment = 1, j = 0;
273273
unsigned char *buf = (unsigned char *) hash->context;
274274
zval *elt;
275275
if (Z_TYPE_P(zv) != IS_ARRAY) {
276276
return FAILURE;
277277
}
278278
while (*spec != '\0' && *spec != '.') {
279279
char spec_ch = *spec;
280-
count = parse_serialize_spec(&spec, &pos, &sz, &max_alignment);
280+
size_t sz, count = parse_serialize_spec(&spec, &pos, &sz, &max_alignment);
281281
if (pos + count * sz > hash->ops->context_size) {
282282
return -999;
283283
}

0 commit comments

Comments
 (0)