Whamcloud - gitweb
A bunch of minor cleanups when using sizeof(). This even appears to have
authoradilger <adilger>
Fri, 29 Mar 2002 22:29:59 +0000 (22:29 +0000)
committeradilger <adilger>
Fri, 29 Mar 2002 22:29:59 +0000 (22:29 +0000)
commitb086032ef025866e71e001281cc64d900b95bcc2
treef66fdd2e9039e4731bd285437e768492543c4b90
parent03fcfd3f5a91131d6af645412ce69502bedaeb06
A bunch of minor cleanups when using sizeof().  This even appears to have
caught 3 minor bugs in the code.  Prompted by a couple of similar bugs that
were just found in the kernel.

Basically, with a variable like "struct foo *bar" it is preferrable to
use "sizeof(*bar)" everywhere instead of "sizeof(struct foo)".  The
former isolates us from errors in case the type of "bad" ever changes.

Apparent bugs were in filter/filter_obd.c and ldlm/ldlm_resource.c (we
were using __u32 when the variable was declared as __u64).  There also
appears to be a memory leak in ldlm_resource.c.
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_resource.c
lustre/llite/super.c
lustre/obdclass/class_obd.c
lustre/obdclass/genops.c
lustre/osc/osc_request.c
lustre/ost/ost_handler.c