According to selabel_opn(3) a non-null value for this option enables the generation of an SHA1 digest of the spec files loaded as described in selabel_digest(3). Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> --- libselinux/src/label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libselinux/src/label.c b/libselinux/src/label.c index 1ea9bdcd..4a7c6e6d 100644 --- a/libselinux/src/label.c +++ b/libselinux/src/label.c @@ -62,7 +62,7 @@ static inline struct selabel_digest *selabel_is_digest_set while (n--) { if (opts[n].type == SELABEL_OPT_DIGEST && - opts[n].value == (char *)1) { + !!opts[n].value) { digest = calloc(1, sizeof(*digest)); if (!digest) goto err; -- 2.43.0