From 1981ffec4ad18287efe8ab693390e1d498de05bf Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Sun, 24 Jun 2018 18:05:56 +0200 Subject: [PATCH] remove unnecessary networkrecord padding --- src/gnsrecord/gnsrecord_serialization.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/gnsrecord/gnsrecord_serialization.c b/src/gnsrecord/gnsrecord_serialization.c index 82b09c24e..a1cfbe984 100644 --- a/src/gnsrecord/gnsrecord_serialization.c +++ b/src/gnsrecord/gnsrecord_serialization.c @@ -89,7 +89,6 @@ GNUNET_GNSRECORD_records_get_size (unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd) { size_t ret; - size_t no_padding; ret = sizeof (struct NetworkRecord) * rd_count; for (unsigned int i=0;i> 1; ret |= ret >> 2; @@ -137,9 +135,6 @@ GNUNET_GNSRECORD_records_get_size (unsigned int rd_count, ret |= ret >> 8; ret |= ret >> 16; ret++; - //If padding record does not fit, pad again. - if ((ret - no_padding) < sizeof (struct NetworkRecord)) - ret = ret << 1; return (ssize_t) ret; } -- 2.25.1