diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-11-24 19:13:00 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-11-24 19:13:00 +0100 |
commit | d17a17ea785f91c18b5694eab3372c4e4564d95e (patch) | |
tree | a7ee983fb1c0fa5a9210938024357cd9498ee344 /src/exit | |
parent | 5f38569fce2e77afeed58cbd3429c67bf8ab9109 (diff) | |
download | gnunet-d17a17ea785f91c18b5694eab3372c4e4564d95e.tar.gz gnunet-d17a17ea785f91c18b5694eab3372c4e4564d95e.zip |
fix pointer indentation
Diffstat (limited to 'src/exit')
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 2 | ||||
-rw-r--r-- | src/exit/gnunet-helper-exit.c | 26 |
2 files changed, 16 insertions, 12 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index c479720d4..6ac4fc38c 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -582,7 +582,7 @@ hash_redirect_info (struct GNUNET_HashCode *hash, | |||
582 | sizeof(struct GNUNET_HashCode)); | 582 | sizeof(struct GNUNET_HashCode)); |
583 | /* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash, | 583 | /* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash, |
584 | so we put the IP address in there (and hope for few collisions) */ | 584 | so we put the IP address in there (and hope for few collisions) */ |
585 | off = (char*) hash; | 585 | off = (char *) hash; |
586 | switch (ri->remote_address.af) | 586 | switch (ri->remote_address.af) |
587 | { | 587 | { |
588 | case AF_INET: | 588 | case AF_INET: |
diff --git a/src/exit/gnunet-helper-exit.c b/src/exit/gnunet-helper-exit.c index 8fd8bedaa..d46032662 100644 --- a/src/exit/gnunet-helper-exit.c +++ b/src/exit/gnunet-helper-exit.c | |||
@@ -85,7 +85,7 @@ static const char *sbin_sysctl; | |||
85 | static const char *sbin_iptables; | 85 | static const char *sbin_iptables; |
86 | 86 | ||
87 | 87 | ||
88 | #if !defined(_LINUX_IN6_H) && defined(__linux__) | 88 | #if ! defined(_LINUX_IN6_H) && defined(__linux__) |
89 | /** | 89 | /** |
90 | * This is in linux/include/net/ipv6.h, but not always exported. | 90 | * This is in linux/include/net/ipv6.h, but not always exported. |
91 | */ | 91 | */ |
@@ -234,32 +234,36 @@ init_tun (char *dev) | |||
234 | strcpy (dev, ifr.ifr_name); | 234 | strcpy (dev, ifr.ifr_name); |
235 | return fd; | 235 | return fd; |
236 | } | 236 | } |
237 | |||
238 | |||
237 | #else /* BSD et al, including DARWIN */ | 239 | #else /* BSD et al, including DARWIN */ |
238 | 240 | ||
239 | #ifdef SIOCIFCREATE | 241 | #ifdef SIOCIFCREATE |
240 | static int | 242 | static int |
241 | init_tun(char *dev) | 243 | init_tun (char *dev) |
242 | { | 244 | { |
243 | int fd; | 245 | int fd; |
244 | int s; | 246 | int s; |
245 | struct ifreq ifr; | 247 | struct ifreq ifr; |
246 | 248 | ||
247 | fd = open(dev, O_RDWR); | 249 | fd = open (dev, O_RDWR); |
248 | if(fd == -1) | 250 | if (fd == -1) |
249 | { | 251 | { |
250 | s = socket(AF_INET, SOCK_DGRAM, 0); | 252 | s = socket (AF_INET, SOCK_DGRAM, 0); |
251 | if (s < 0) | 253 | if (s < 0) |
252 | return -1; | 254 | return -1; |
253 | memset(&ifr, 0, sizeof(ifr)); | 255 | memset (&ifr, 0, sizeof(ifr)); |
254 | strncpy(ifr.ifr_name, dev + 5, sizeof(ifr.ifr_name) - 1); | 256 | strncpy (ifr.ifr_name, dev + 5, sizeof(ifr.ifr_name) - 1); |
255 | if (!ioctl(s, SIOCIFCREATE, &ifr)) | 257 | if (! ioctl (s, SIOCIFCREATE, &ifr)) |
256 | fd = open(dev, O_RDWR); | 258 | fd = open (dev, O_RDWR); |
257 | close(s); | 259 | close (s); |
258 | } | 260 | } |
259 | return fd; | 261 | return fd; |
260 | } | 262 | } |
263 | |||
264 | |||
261 | #else | 265 | #else |
262 | #define init_tun(dev) open(dev, O_RDWR) | 266 | #define init_tun(dev) open (dev, O_RDWR) |
263 | #endif | 267 | #endif |
264 | #endif /* !IFF_TUN (BSD) */ | 268 | #endif /* !IFF_TUN (BSD) */ |
265 | 269 | ||