summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-10-31 11:59:39 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-10-31 12:02:57 +0100
commitdd422a058833afa5461668c791071f441cc6ec02 (patch)
tree19f03e3b796caf4934a607c5291b02731e9032c0
parent69f7aa57470229498435bb936207cca3ee7796c2 (diff)
downloadglib-dd422a058833afa5461668c791071f441cc6ec02.tar.gz
gio/tests/win32-streams: Avoid doing sign casting when we can
the offset can be just an unsigned parameter so that we don't have to cast the sizeof (DATA) result.
-rw-r--r--gio/tests/win32-streams.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gio/tests/win32-streams.c b/gio/tests/win32-streams.c
index 6451a9faa..9c32a56b2 100644
--- a/gio/tests/win32-streams.c
+++ b/gio/tests/win32-streams.c
@@ -40,7 +40,8 @@ static gpointer
writer_thread (gpointer user_data)
{
GOutputStream *out;
- gssize nwrote, offset;
+ gssize nwrote;
+ size_t offset;
GError *err = NULL;
HANDLE out_handle;
@@ -58,7 +59,7 @@ writer_thread (gpointer user_data)
g_usleep (10);
offset = 0;
- while (offset < (gssize) sizeof (DATA))
+ while (offset < sizeof (DATA))
{
nwrote = g_output_stream_write (out, DATA + offset,
sizeof (DATA) - offset,