bug in HEAD: init_unistr2_from_unistr

Gerald Carter gcarter at valinux.com
Sat Aug 5 19:08:38 GMT 2000

Jean Francois Micouleau wrote:
> you can rewrite the while loop without the if:
>         while (from->buffer[i++] !=0 );
> the if(!found) test can be removed. You just have to 
> hope the string is terminated.

Yeah, but the found variable is used in a debug test 
after the loop so the optimization is

> the string copy can be a simple:
> memcpy( to->buffer, from->buffer, to->uni_str_len*sizeof(uint16) );

Got it.


More information about the samba-technical mailing list