From 1b0e7d3f59c3236aae3a64b7b19ee827eec4bb9c Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Thu, 1 Aug 2019 10:31:44 +0200 Subject: [PATCH] eliminate nonsensical compare --- src/cadet/gnunet-service-cadet_peer.c | 15 ++++++--------- 1 file 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 @@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . @@ -245,17 +245,14 @@ GCP_2s (const struct CadetPeer *cp) static char buf[5]; char *ret; - if ((NULL == cp) || - (NULL == &cp->pid.public_key)) + if ((NULL == cp) || + (0 == GNUNET_is_zero (&cp->pid.public_key))) return "NULL"; - - + ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); - if (NULL == ret) return "NULL"; - - + GNUNET_strlcpy (buf, ret, sizeof (buf)); @@ -1218,7 +1215,7 @@ GCP_iterate_paths (struct CadetPeer *cp, (NULL == cp->core_mq) ? "" : " including direct link"); if (NULL != cp->core_mq) { - /* FIXME: this branch seems to duplicate the + /* FIXME: this branch seems to duplicate the i=0 case below (direct link). Leave out!??? -CG */ struct CadetPeerPath *path; -- 2.25.1