We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf98c61 commit 861bb64Copy full SHA for 861bb64
src/apps/ble_at_manager.c
@@ -638,15 +638,8 @@ at_error_code_t at_name_set(const uint8_t *param)
638
{
639
uint32_t err_code;
640
at_error_code_t at_err_code;
641
- uint8_t name[31];
642
- memset(name, 0, sizeof(name));
643
-
644
- // Check parameters
645
- if (sscanf(param, "%[^\n]", &name) != 1)
646
- {
647
- return AT_ERROR_INVALID_PARAM;
648
- }
649
+ uint8_t *name = param;
+
650
if (strlen(name) > 27)
651
652
return AT_ERROR_INVALID_LENGTH;
@@ -664,7 +657,7 @@ at_error_code_t at_name_read(const uint8_t *param)
664
657
665
658
666
659
667
660
+ uint8_t name[31] = "";
668
661
669
662
// Read value
670
663
err_code = ble_manager_name_read(name);
0 commit comments