[PATCH:libFS 1/2] Change FSOpenServer and FSServerName to take const char * args.
Mark Kettenis
mark.kettenis at xs4all.nl
Sat Nov 12 02:08:38 PST 2011
> From: Alan Coopersmith <alan.coopersmith at oracle.com>
> Date: Fri, 11 Nov 2011 21:43:04 -0800
> diff --git a/src/FSServName.c b/src/FSServName.c
> index 022be82..a535b38 100644
> --- a/src/FSServName.c
> +++ b/src/FSServName.c
> @@ -59,12 +59,12 @@ in this Software without prior written authorization from The Open Group.
> #include "FSlib.h"
>
> char *
> -FSServerName(char *server)
> +FSServerName(const char *server)
I think it is wrong to make it accept a const string...
> {
> char *s;
>
> if (server != NULL && *server != '\0')
> - return server;
> + return (char *) server;
...you're then going to return a non-const version of it.
More information about the xorg-devel
mailing list