diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-08-01 10:31:44 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-08-01 10:31:44 +0200 |
commit | 1b0e7d3f59c3236aae3a64b7b19ee827eec4bb9c (patch) | |
tree | 60b0300a881a12559bfb94b4b91a25f9f53afcde /src/cadet | |
parent | b97b12fabb292eab6c31585046fbdec374ab68ad (diff) | |
download | gnunet-1b0e7d3f59c3236aae3a64b7b19ee827eec4bb9c.tar.gz gnunet-1b0e7d3f59c3236aae3a64b7b19ee827eec4bb9c.zip |
eliminate nonsensical compare
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index c25f46de5..d6cc6f914 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -245,17 +245,14 @@ GCP_2s (const struct CadetPeer *cp) | |||
245 | static char buf[5]; | 245 | static char buf[5]; |
246 | char *ret; | 246 | char *ret; |
247 | 247 | ||
248 | if ((NULL == cp) || | 248 | if ((NULL == cp) || |
249 | (NULL == &cp->pid.public_key)) | 249 | (0 == GNUNET_is_zero (&cp->pid.public_key))) |
250 | return "NULL"; | 250 | return "NULL"; |
251 | 251 | ||
252 | |||
253 | ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); | 252 | ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); |
254 | |||
255 | if (NULL == ret) | 253 | if (NULL == ret) |
256 | return "NULL"; | 254 | return "NULL"; |
257 | 255 | ||
258 | |||
259 | GNUNET_strlcpy (buf, | 256 | GNUNET_strlcpy (buf, |
260 | ret, | 257 | ret, |
261 | sizeof (buf)); | 258 | sizeof (buf)); |
@@ -1218,7 +1215,7 @@ GCP_iterate_paths (struct CadetPeer *cp, | |||
1218 | (NULL == cp->core_mq) ? "" : " including direct link"); | 1215 | (NULL == cp->core_mq) ? "" : " including direct link"); |
1219 | if (NULL != cp->core_mq) | 1216 | if (NULL != cp->core_mq) |
1220 | { | 1217 | { |
1221 | /* FIXME: this branch seems to duplicate the | 1218 | /* FIXME: this branch seems to duplicate the |
1222 | i=0 case below (direct link). Leave out!??? -CG */ | 1219 | i=0 case below (direct link). Leave out!??? -CG */ |
1223 | struct CadetPeerPath *path; | 1220 | struct CadetPeerPath *path; |
1224 | 1221 | ||