sid_to_string / string_to_sid problems
Chris Wedgwood
cw at ix.net.nz
Wed Nov 25 22:06:25 GMT 1998
On Tue, Nov 24, 1998 at 05:54:14AM +1100, Luke Kenneth Casson Leighton wrote:
> does anyone wish to write a strtoul AUTOCONF test, or write an
> unsigned 32 bit text-to-uint32 routine?
>
> luke
off the top of my head... not compiled or anything:
uint32_t atoul32(char *str)
{
char c;
uint32_t v = 0;
while((c = *str)){
if((c < '0') || (c > '9'))
return v;
v = v*10 + (c - '0')
str++;
}
return v;
}
is this what you mean?
-cw
More information about the samba-ntdom
mailing list