commit | a538dcd8f8db5758ffe89f58c63a821416369b6f | [log] [tgz] |
---|---|---|
author | Peter Bigot <peter.bigot@nordicsemi.no> | Mon Jun 22 09:56:19 2020 -0500 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Tue Jun 23 13:27:14 2020 +0200 |
tree | d849e878ea3d0089cf630d39dab4db85d8aa14fa | |
parent | 219a3ca96d192a2ed0cdd516caae871f44e53cfb [diff] |
shell: refactor device_name_get implementation Several shell modules use cloned code to iterate over all devices and identify the nth instance that meets some criteria. The code was repetitive and included various errors. Abstract to a helper function that performs the check consistently. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>