[tor-commits] [tor] 10/11: perform proper 'OR' while checking defined vars

gitolite role git at cupani.torproject.org
Mon Nov 28 14:39:43 UTC 2022


This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 642e56bdb640150804286d1c60fdae36796bc14b
Author: Vinícius Zavam <egypcio at googlemail.com>
AuthorDate: Sun Nov 27 18:41:09 2022 +0000

    perform proper 'OR' while checking defined vars
    
      * the || is not possible with #ifdef statement;
      * here the #ifdef turns into '#if defined()'.
---
 src/lib/osinfo/libc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c
index 452fce676b..1ca26ff707 100644
--- a/src/lib/osinfo/libc.c
+++ b/src/lib/osinfo/libc.c
@@ -31,7 +31,7 @@
 const char *
 tor_libc_get_name(void)
 {
-#ifdef __BSD_VISIBLE || __NETBSD_SOURCE
+#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
   return "BSD";
 #endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */
 #ifdef __GLIBC__
@@ -46,7 +46,7 @@ tor_libc_get_name(void)
 const char *
 tor_libc_get_version_str(void)
 {
-#ifdef __BSD_VISIBLE || __NETBSD_SOURCE
+#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE)
 #include <sys/param.h>
 #ifdef __DragonFly_version
   return STR(__DragonFly_version);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list