blob: ec6a8c783ce1123686d828ea7694c57aac16934e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* Copyright (c) 2003-2004, Roger Dingledine
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2021, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file logic.h
*
* \brief Macros for comparing the boolean value of integers.
**/
#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 /* !defined(HAVE_TOR_LOGIC_H) */
|