libsmack: shrink few rule and label struct fields
authorRafal Krypa <r.krypa@samsung.com>
Thu, 13 Feb 2014 13:16:40 +0000 (14:16 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 13 Feb 2014 16:19:07 +0000 (17:19 +0100)
commit916a9470278f1a27ce39b8cf0d70fb33a3319a95
tree01490354288f300f1668ad125203c421ad187b13
parent190d0e29c962d4a6dc1f8bcac8e4571146a2e810
libsmack: shrink few rule and label struct fields

Use smaller struct fields to optimize memory usage and speed.
On a 32-bit machine this saves 4 bytes per rule and 4 bytes per label.
Limit label length to 8 bits. It's max value is already limited to 255.
Limit label id to 16 bits. While policy with more than 2^16 labels is
theoretically possible, it would be handled very badly by kernel.

Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
libsmack/libsmack.c