From f6dd73207ff0e4ebb4e3f8edf5317c8c2c158a65 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Mon, 9 Jun 2008 14:41:28 +0000 Subject: [PATCH] Make one-bit fields unsigned instead of signed. This has no effect, since they are only tested for zero/nonzero; but it's arguably a bad idea to set a {-1, 0} variable to 1 (as happens in this code). Found by: Coverity Prevent --- usr.bin/tar/subst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/tar/subst.c b/usr.bin/tar/subst.c index ea96d156b7a..1c24d068a0c 100644 --- a/usr.bin/tar/subst.c +++ b/usr.bin/tar/subst.c @@ -42,7 +42,7 @@ struct subst_rule { struct subst_rule *next; regex_t re; char *result; - int global:1, print:1, symlink:1; + unsigned int global:1, print:1, symlink:1; }; struct substitution {