From: vivek Date: Tue, 9 Aug 2016 22:54:14 +0000 (-0700) Subject: lib: Use single correct definition for prefix string buffer X-Git-Tag: frr-3.0-branchpoint~83^2~11 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a9ea959fae3c2b985867f49dd41bdde2b54c9b83;p=matthieu%2Ffrr.git lib: Use single correct definition for prefix string buffer Signed-off-by: Vivek Venkatraman Reivewed-by: Donald Sharp Ticket: CM-12262 Reviewed By: CCR-5065 Testing Done: Manual --- diff --git a/lib/prefix.h b/lib/prefix.h index a2cdfe96fb..45e6368463 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -230,13 +230,8 @@ extern const char *prefix_family_str (const struct prefix *); extern int prefix_blen (const struct prefix *); extern int str2prefix (const char *, struct prefix *); -/* - * 8 groups of 4 bytes of hexadecimal + 7 seperators is 39 - * /128 = 4 bytes - * Null = 1 byte - * 39 + 4 + 1 = 44 bytes - */ -#define PREFIX2STR_BUFFER 44 +#define PREFIX2STR_BUFFER PREFIX_STRLEN + extern const char *prefix2str (union prefix46constptr, char *, int); extern int prefix_match (const struct prefix *, const struct prefix *); extern int prefix_same (const struct prefix *, const struct prefix *);