diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2013-12-17 09:21:24 +0000 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-12-18 17:49:30 -0500 |
commit | 332c9c5b329426f2d255e9eaf856aa79fe813a77 (patch) | |
tree | 8214381d700beca05777a67d4e1eae55db000cba /socket/http.c | |
parent | 4b11c683760b545a8bc5171e348cc13d031d60cb (diff) | |
download | libnice-332c9c5b329426f2d255e9eaf856aa79fe813a77.tar.gz |
Fix variable shadowing
Diffstat (limited to 'socket/http.c')
-rw-r--r-- | socket/http.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/socket/http.c b/socket/http.c index 90b11b2..eaea4b6 100644 --- a/socket/http.c +++ b/socket/http.c @@ -317,17 +317,17 @@ socket_recv (NiceSocket *sock, NiceAddress *from, guint len, gchar *buf) break; case HTTP_STATE_CONNECTED: { - guint read = priv->recv_len; + guint recv_len = priv->recv_len; struct to_be_sent *tbs = NULL; - if (read > len) - read = len; + if (recv_len > len) + recv_len = len; - memcpy (buf, priv->recv_buf, read); + memcpy (buf, priv->recv_buf, recv_len); /* consume the data we returned */ - priv->recv_len -= read; - memmove (priv->recv_buf, priv->recv_buf + read, priv->recv_len); + priv->recv_len -= recv_len; + memmove (priv->recv_buf, priv->recv_buf + recv_len, priv->recv_len); priv->recv_buf = g_realloc (priv->recv_buf, priv->recv_len); /* Send the pending data */ @@ -338,7 +338,7 @@ socket_recv (NiceSocket *sock, NiceAddress *from, guint len, gchar *buf) g_slice_free (struct to_be_sent, tbs); } - return read; + return recv_len; } break; default: |