qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 09/13] block/gluster: Use URI parsing code from glib


From: Eric Blake
Subject: Re: [PATCH v2 09/13] block/gluster: Use URI parsing code from glib
Date: Fri, 12 Apr 2024 09:43:48 -0500
User-agent: NeoMutt/20240201

On Fri, Apr 12, 2024 at 09:40:18AM -0500, Eric Blake wrote:
> > @@ -364,57 +363,57 @@ static int 
> > qemu_gluster_parse_uri(BlockdevOptionsGluster *gconf,
> >      QAPI_LIST_PREPEND(gconf->server, gsconf);
> >  
> >      /* transport */
> > -    if (!uri->scheme || !strcmp(uri->scheme, "gluster")) {
> > +    uri_scheme = g_uri_get_scheme(uri);
> > +    if (!uri_scheme || !strcmp(uri_scheme, "gluster")) {
> 
> Pre-existing, but per RFC 3986, we should probably be using strcasecmp
> for scheme comparisons (I'm not sure if g_uri_parse guarantees a
> lower-case return, even when the user passed in upper case).  That can
> be a separate patch.

Even beter, g_ascii_strcasecmp() (since strcasecmp can be
locale-specific which is generally not what we need here)


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]