Skip to contentSkip to conversation

valgrind complains

Bluez-users wim delvaux 2 participants 2 messages Dec 8, 2004 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

about unintialized values in the following code

struct hci_dev_info di;

         di.dev_id = dev_id;

         if( ioctl( fd, HCIGETDEVINFO, (void*)&di) != 0 )
              continue;  // uh ?

printf( "%s\n", di.name ); // here valgrind complains on the third character

Should I perhaps memset ? is name field null terminated ?

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Wim,

Quoted 9 lines

about unintialized values in the following code

struct hci_dev_info di;

         di.dev_id = dev_id;

         if( ioctl( fd, HCIGETDEVINFO, (void*)&di) != 0 )
              continue;  // uh ?
Quoted 4 lines

printf( "%s\n", di.name ); // here valgrind complains on the third character

Should I perhaps memset ? is name field null terminated ?

maybe you should include the filename to let us know where to look.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users