mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
guri: Use gssize for array/string lengths
This reduces the possibility for overflow, and makes the code a little more conventional to read. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
e446c3487b
commit
b5c59cc3fc
@ -2555,7 +2555,7 @@ g_uri_escape_bytes (const guint8 *unescaped,
|
||||
return g_string_free (string, FALSE);
|
||||
}
|
||||
|
||||
static gint
|
||||
static gssize
|
||||
g_uri_scheme_length (const gchar *uri)
|
||||
{
|
||||
const gchar *p;
|
||||
@ -2593,7 +2593,7 @@ g_uri_scheme_length (const gchar *uri)
|
||||
gchar *
|
||||
g_uri_parse_scheme (const gchar *uri)
|
||||
{
|
||||
gint len;
|
||||
gssize len;
|
||||
|
||||
g_return_val_if_fail (uri != NULL, NULL);
|
||||
|
||||
@ -2625,7 +2625,7 @@ g_uri_parse_scheme (const gchar *uri)
|
||||
const gchar *
|
||||
g_uri_peek_scheme (const gchar *uri)
|
||||
{
|
||||
gint len;
|
||||
gssize len;
|
||||
gchar *lower_scheme;
|
||||
const gchar *scheme;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user