On 03/12/10 05:07 PM, Sean Wilcox wrote: > On 03/12/10 05:47 PM, Antonello Cruz wrote: >> The changes from my previous comments look good. there is just a >> couple of thing I did not notice before: >> >> >> usr/src/cmd/svc/svccfg/svccfg_libscf.c >> lscf_service_cleanup(): >> The strncmp() are not necessary since you're know the literals >> you are comparing against are bounded. Unless you are looking >> for partial matches. Is this the case? >> >> 15289: Sorry I did not notice this before, but I think ti is a good >> practice in ON to check the result of str[n]cmp() againt >> zero. I think cstyle or lint should have complained, but I am >> not sure. >> >> Antonello > > 15254 strncmp(mpnbuf, SUPPORTPROP, sizeof (SUPPORTPROP)) : can be changed > 15289 strncmp(mpnbuf, LIBSVC_PR, strlen(LIBSVC_PR)) : Checking a prefix > 15294 strncmp(mpnbuf, VARSVC_PR, strlen(VARSVC_PR)) : Checking a prefix OK
> > We specifically want to fall into the loop when they are non-zero (the > prefix > is not matched), should I explicitly modify the checks at 15289 and > 15294 to > check against != 0? That would be desirable, even though neither lint or cstyle complained. Antonello > > cstyle nor lint complained about either of these entries. >