linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] hciconfig service class listing patch
@ 2006-02-23 20:33 Claudio Takahasi
  2006-02-23 21:16 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Claudio Takahasi @ 2006-02-23 20:33 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

Hi Marcel,

while I was developing the service class for D-Bus I noticed that
there is a small bug in the hciconfig service class listing.

The sizeof is getting the pointer size instead of check the number of
array elements.


Regards,
Claudio.
--
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT

[-- Attachment #2: hciconfig-service-class.patch --]
[-- Type: text/x-patch, Size: 567 bytes --]

Index: tools/hciconfig.c
===================================================================
RCS file: /cvsroot/bluez/utils/tools/hciconfig.c,v
retrieving revision 1.78
diff -u -r1.78 hciconfig.c
--- tools/hciconfig.c	15 Feb 2006 09:17:52 -0000	1.78
+++ tools/hciconfig.c	23 Feb 2006 20:27:45 -0000
@@ -666,7 +666,7 @@
 		printf("\tService Classes: ");
 		if (cls[2]) {
 			int first = 1;
-			for (s = 0; s < sizeof(*services); s++)
+			for (s = 0; s < (sizeof(services) / sizeof(*services)); s++)
 				if (cls[2] & (1 << s)) {
 					if (!first)
 						printf(", ");

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-23 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-23 20:33 [Bluez-devel] hciconfig service class listing patch Claudio Takahasi
2006-02-23 21:16 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).