From 793a10a2d435cb3e5d52bc06cf0a06191006148a Mon Sep 17 00:00:00 2001 From: balrog Date: Sat, 8 Nov 2008 23:57:26 +0000 Subject: Revert r5532, r5536 and a piece of r5531. The use of strncat and strndup was correct, pstrcpy and pstrdup wasn't. I'll try to restore building on non-gnu OSes in a later commit. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5651 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/bt-hci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hw/bt-hci.c') diff --git a/hw/bt-hci.c b/hw/bt-hci.c index 121fabf45..71c12b85f 100644 --- a/hw/bt-hci.c +++ b/hw/bt-hci.c @@ -1137,7 +1137,7 @@ static void bt_hci_reset(struct bt_hci_s *hci) hci->device.inquiry_scan = 0; hci->device.page_scan = 0; if (hci->device.lmp_name) - qemu_free((void *) hci->device.lmp_name); + free((void *) hci->device.lmp_name); hci->device.lmp_name = 0; hci->device.class[0] = 0x00; hci->device.class[1] = 0x00; @@ -1387,7 +1387,7 @@ static inline void bt_hci_event_complete_read_local_name(struct bt_hci_s *hci) params.status = HCI_SUCCESS; memset(params.name, 0, sizeof(params.name)); if (hci->device.lmp_name) - pstrcpy(params.name, sizeof(params.name), hci->device.lmp_name); + strncpy(params.name, hci->device.lmp_name, sizeof(params.name)); bt_hci_event_complete(hci, ¶ms, READ_LOCAL_NAME_RP_SIZE); } @@ -1815,8 +1815,8 @@ static void bt_submit_hci(struct HCIInfo *info, LENGTH_CHECK(change_local_name); if (hci->device.lmp_name) - qemu_free((void *) hci->device.lmp_name); - hci->device.lmp_name = pstrdup(PARAM(change_local_name, name), + free((void *) hci->device.lmp_name); + hci->device.lmp_name = strndup(PARAM(change_local_name, name), sizeof(PARAM(change_local_name, name))); bt_hci_event_complete_status(hci, HCI_SUCCESS); break; @@ -2191,7 +2191,7 @@ static void bt_hci_done(struct HCIInfo *info) bt_device_done(&hci->device); if (hci->device.lmp_name) - qemu_free((void *) hci->device.lmp_name); + free((void *) hci->device.lmp_name); /* Be gentle and send DISCONNECT to all connected peers and those * currently waiting for us to accept or reject a connection request. -- cgit v1.2.3 lass='txt' type='search' size='10' name='q' value=''/>
path: root/drivers/net/wireless/rtl818x.h
AgeCommit message (Expand)AuthorFilesLines
2008-01-28Add rtl8180 wireless driverMichael Wu1-4/+25
2007-10-10[PATCH] mac80211: revamp interface and filter configurationJohannes Berg1-0/+1