From e56d5ecd373dd61bedb4f586decd3a19364527a0 Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Tue, 26 Jun 2018 15:11:08 +0200 Subject: [PATCH] coding style --- src/cadet/gnunet-service-cadet_peer.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 53c51c27a..ac1ee59de 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c @@ -243,11 +243,17 @@ GCP_2s (const struct CadetPeer *cp) static char buf[5]; char *ret; - if (NULL == cp || NULL == &cp->pid.public_key) - return "NULL"; + if (NULL == cp || + NULL == &cp->pid.public_key){ + return "NULL"; + } + ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); - if (NULL == ret) - return "NULL"; + + if (NULL == ret){ + return "NULL"; + } + strncpy (buf, ret, sizeof (buf) - 1); -- 2.25.1