[PATCH] Remove trailing slashes from service name

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Dec 6 11:04:08 GMT 2007


Hi, Andreas!

On Wed, Dec 05, 2007 at 02:16:15PM +0100, Andreas Schneider wrote:
> @@ -4140,6 +4140,12 @@ static int do_message_op(void)
>  			poptPrintUsage(pc, stderr, 0);
>  			exit(1);
>  		}
> +		/* Remove trailing slashes */
> +		int len = strlen(service);
> +		while(len > 0 && service[len - 1] == '\\') {
> +			--len;
> +			service[len] = '\0';
> +		}
>  	}

This patch adds the variable "len" after statements. Can you
make that compile without warning with
-Wdeclaration-after-statement? Many non-gcc compilers don't
accept this.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20071206/28d3c54c/attachment.bin


More information about the samba-technical mailing list