xref: /illumos-gate/usr/src/tools/smatch/src/validation/backend/logical-ops.c (revision e82490700e19f1b8a2cef6102f4726144d281988)
1 static int and_bool(int x, int y)
2 {
3 	return x && y;
4 }
5 
6 static unsigned int uand_bool(unsigned int x, unsigned int y)
7 {
8 	return x && y;
9 }
10 
11 static int or_bool(int x, int y)
12 {
13 	return x || y;
14 }
15 
16 static unsigned int uor_bool(unsigned int x, unsigned int y)
17 {
18 	return x || y;
19 }
20 
21 /*
22  * check-name: Logical operator code generation
23  * check-command: sparsec -c $file -o tmp.o
24  */
25