Discussion:
[Libstoragemgmt-devel] [PATCH] C API: Simplify lsm_capability_set_n
Tony Asleson
2014-08-01 18:53:18 UTC
Permalink
More than once the call to lsm_capability_set_n has been done incorrectly
when adding or removing capabilities. Christophe offered this good suggestion:

"
Christophe Fergeau
2014-08-02 17:33:58 UTC
Permalink
Hey,
Post by Tony Asleson
More than once the call to lsm_capability_set_n has been done incorrectly
Tony Asleson
2014-08-05 16:35:39 UTC
Permalink
I would use '-1' rather than a named constant so that it's very obvious
that this value is very special when it shows up in an argument list,
but that's just a matter of personal preference :)
I flipped this over to just use -1 and I agree it does stand out more
when you are looking over the list and want to ensure it's terminated.
Typically I try to avoid using 'magic' numbers, but it's helpful here.

I will update change to reflect this.
The patch looks good to me.
Thanks for the review.

Regards,
Tony

Loading...