mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-30 15:56:18 +01:00
gsocket.c: Declare variables at the top-of-block
This will allow the code to build on C89 compilers, since they do not allow declaring a variable within a for loop initializer.
This commit is contained in:
parent
20bd716d4c
commit
ce660066f2
@ -4795,7 +4795,9 @@ g_socket_send_message (GSocket *socket,
|
||||
|
||||
if (num_vectors != -1)
|
||||
{
|
||||
for (gint i = 0; i < num_vectors; i++)
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < num_vectors; i++)
|
||||
{
|
||||
/* No wrap-around for vectors_size */
|
||||
if (vectors_size > vectors_size + vectors[i].size)
|
||||
@ -4811,7 +4813,9 @@ g_socket_send_message (GSocket *socket,
|
||||
}
|
||||
else
|
||||
{
|
||||
for (gsize i = 0; vectors[i].buffer != NULL; i++)
|
||||
gsize i;
|
||||
|
||||
for (i = 0; vectors[i].buffer != NULL; i++)
|
||||
{
|
||||
/* No wrap-around for vectors_size */
|
||||
if (vectors_size > vectors_size + vectors[i].size)
|
||||
|
Loading…
Reference in New Issue
Block a user