diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-29 10:21:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-29 12:21:52 -0400 |
commit | 77bc65bbc495095d4d2679631e06a498ea1e2529 (patch) | |
tree | fc4fd6333bc7eb641957f853263a0771d3b3b32e /src/lib/intmath/logic.h | |
parent | 40199b180e53aa36477c75782be51bd689189287 (diff) | |
download | tor-77bc65bbc495095d4d2679631e06a498ea1e2529.tar.gz tor-77bc65bbc495095d4d2679631e06a498ea1e2529.zip |
Move bool_eq and bool_neq to lib/intmath
Diffstat (limited to 'src/lib/intmath/logic.h')
-rw-r--r-- | src/lib/intmath/logic.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/intmath/logic.h b/src/lib/intmath/logic.h new file mode 100644 index 0000000000..0510a621dc --- /dev/null +++ b/src/lib/intmath/logic.h @@ -0,0 +1,14 @@ +/* Copyright (c) 2003-2004, Roger Dingledine + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +#ifndef HAVE_TOR_LOGIC_H +#define HAVE_TOR_LOGIC_H + +/** Macro: true if two values have the same boolean value. */ +#define bool_eq(a,b) (!(a)==!(b)) +/** Macro: true if two values have different boolean values. */ +#define bool_neq(a,b) (!(a)!=!(b)) + +#endif |