diff options
author | Vinit Deshpande <vinitd@google.com> | 2015-07-16 22:56:38 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-16 22:56:38 +0000 |
commit | 207f0ec3e0553759771eb11d735a85cba515d8e4 (patch) | |
tree | 6caa52ef9fee5c8a4e4240f85c783833e94dc86e /bcmdhd/wifi_hal/common.cpp | |
parent | 36a87a16bcdf694a8ec38e9c35e933bd7d55e51d (diff) | |
parent | f02f545dd490b658110fb837f4905050b3ed9c52 (diff) | |
download | hardware_broadcom_wlan-207f0ec3e0553759771eb11d735a85cba515d8e4.zip hardware_broadcom_wlan-207f0ec3e0553759771eb11d735a85cba515d8e4.tar.gz hardware_broadcom_wlan-207f0ec3e0553759771eb11d735a85cba515d8e4.tar.bz2 |
am f02f545d: Fix couple of issues with unregistering event handlers
* commit 'f02f545dd490b658110fb837f4905050b3ed9c52':
Fix couple of issues with unregistering event handlers
Diffstat (limited to 'bcmdhd/wifi_hal/common.cpp')
-rw-r--r-- | bcmdhd/wifi_hal/common.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bcmdhd/wifi_hal/common.cpp b/bcmdhd/wifi_hal/common.cpp index fc81d61..f0184d6 100644 --- a/bcmdhd/wifi_hal/common.cpp +++ b/bcmdhd/wifi_hal/common.cpp @@ -180,7 +180,7 @@ WifiCommand *wifi_unregister_cmd(wifi_handle handle, int id) for (int i = 0; i < info->num_cmd; i++) { if (info->cmd[i].id == id) { cmd = info->cmd[i].cmd; - memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i) * sizeof(cmd_info)); + memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i - 1) * sizeof(cmd_info)); info->num_cmd--; ALOGV("Successfully removed command %d: %p from %d", id, cmd, i); break; |