diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-30 11:25:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-30 11:25:55 +0000 |
commit | 93d398e24bf365398942f83be36352fb4f51dd85 (patch) | |
tree | 86af16e050f7916bd6451982d2c5dafbce0d0e31 /src/util | |
parent | 1f5ef97a7f004d62d70e8fe9861d5b0d46cd5341 (diff) | |
download | gnunet-93d398e24bf365398942f83be36352fb4f51dd85.tar.gz gnunet-93d398e24bf365398942f83be36352fb4f51dd85.zip |
minor cleanup
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/peer.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/util/peer.c b/src/util/peer.c index 1491211c5..39d11883d 100644 --- a/src/util/peer.c +++ b/src/util/peer.c | |||
@@ -90,17 +90,13 @@ GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid) | |||
90 | return 0; | 90 | return 0; |
91 | off = (long) GNUNET_CONTAINER_multihashmap_get (map, &pid->hashPubKey); | 91 | off = (long) GNUNET_CONTAINER_multihashmap_get (map, &pid->hashPubKey); |
92 | e = (off == 0) ? NULL : &table[off]; | 92 | e = (off == 0) ? NULL : &table[off]; |
93 | if (e != NULL) | 93 | if (e == NULL) |
94 | { | ||
95 | GNUNET_assert (e->rc > 0); | ||
96 | return e->pid; | ||
97 | } | ||
98 | else | ||
99 | { | ||
100 | return 0; | 94 | return 0; |
101 | } | 95 | GNUNET_assert (e->rc > 0); |
96 | return e->pid; | ||
102 | } | 97 | } |
103 | 98 | ||
99 | |||
104 | /** | 100 | /** |
105 | * Intern an peer identity. If the identity is already known, its | 101 | * Intern an peer identity. If the identity is already known, its |
106 | * reference counter will be increased by one. | 102 | * reference counter will be increased by one. |