[PATCH obexd 3/4] Code clean-up: Remove magic number indicating size of buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 plugins/vcard.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/vcard.c b/plugins/vcard.c
index ca3a052..901a2ac 100644
--- a/plugins/vcard.c
+++ b/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) {
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux