query about rpcclient process_cmd:

Martin Pool mbp at samba.org
Thu Feb 13 03:36:08 GMT 2003


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?

-- 
Martin 


More information about the samba-technical mailing list