Hi Jan and Alex.
Jan Damborsky wrote:
> Jan Damborsky wrote:
>> 1125 if (strncmp(devid, "/dev/zvol", sizeof
>> ("/dev/zvol")) == 0)
>
>
> Well, it actually should be either
>
> 1125 if (strncmp(devid, "/dev/zvol", sizeof
> ("/dev/zvol") - 1) == 0)
>
> or
>
> 1125 if (strncmp(devid, "/dev/zvol", strlen
> ("/dev/zvol")) == 0)
Of the two above, I prefer the first. "sizeof" is resolved at compile
time, whereas strlen chews up CPU during runtime.
Thanks,
Jack
>
>
> Jan
> _______________________________________________
> caiman-discuss mailing list
> caiman-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss