query about rpcclient process_cmd:
Gerald (Jerry) Carter
jerry at samba.org
Thu Feb 13 18:17:46 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 13 Feb 2003, Martin Pool wrote:
> rpcclient.c/process_cmd has
>
> if (cmd[strlen(cmd) - 1] == '\n')
> cmd[strlen(cmd) - 1] = '\0';
>
> if (!next_token(&p, buf, " ", sizeof(buf))) {
> return NT_STATUS_OK;
> }
>
> /* strip the trainly \n if it exsists */
> len = strlen(buf);
> if (buf[len-1] == '\n')
> buf[len-1] = '\0';
>
> Isn't the second check for newline redundant?
Looks like it to me.
cheers, jerry
----------------------------------------------------------------------
Hewlett-Packard ------------------------- http://www.hp.com
SAMBA Team ---------------------- http://www.samba.org
GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc
"You can never go home again, Oatman, but I guess you can shop there."
--John Cusack - "Grosse Point Blank" (1997)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/
iD8DBQE+S+FKIR7qMdg1EfYRAsXPAKDhOCfKUsLf8MywJy94yKVZRVM94wCeKrMm
x75I2O47QsR+1YI55Rp/Gyg=
=aP2U
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list