From 0b2354016f12d25bc40aa2d3429ddac9dea92f22 Mon Sep 17 00:00:00 2001 From: Rafal Michalski Date: Thu, 22 Sep 2011 09:52:47 +0200 Subject: [PATCH] obexd: Remove magic number indicating size of buffer This patch removes "magic number" indicating buffer's size in "vcard_printf_number" function and replace it by value defined under LEN_MAX. Now it would be consistent with the rest of code, since all functions from vcard_prinf_* family use LEN_MAX to indicate size of buffer which may store some vCard's field content. --- obexd/plugins/vcard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obexd/plugins/vcard.c b/obexd/plugins/vcard.c index 9c63595d5..307230640 100644 --- a/obexd/plugins/vcard.c +++ b/obexd/plugins/vcard.c @@ -406,7 +406,7 @@ static void vcard_printf_number(GString *vcards, uint8_t format, enum phonebook_number_type category) { const char *intl = "", *category_string = ""; - char buf[128], field[LEN_MAX]; + char buf[LEN_MAX], field[LEN_MAX]; /* TEL is a mandatory field, include even if empty */ if (!number || !strlen(number) || !type) { -- 2.47.3