int max_stations, int security)
{
int rv = 0;
- char buf[32] = {0,};
+ char buf[2] = {0,};
CHECK_FEATURE_SUPPORTED(MESH_FEATURE);
if (NULL == handle || ssid == NULL || key == NULL) {
/* LCOV_EXCL_STOP */
}
- if (channel <= 13)
- memcpy(buf, "g", strlen("g"));
- else
- memcpy(buf, "a", strlen("a"));
+ if (channel <= 13) {
+ buf[0] = 'g';
+ buf[1] = 0;
+ }
+ else {
+ buf[0] = 'a';
+ buf[1] = 0;
+ }
rv = _wifi_mesh_set_softap(handle, ssid, key, buf, channel,
visibility, max_stations, security);