void setenv(uint8_t argc, char **argv) { uint8_t i; char c_value = NULL; char
value = &c_value; if (argc > 3) { /
environment variable value string together */ for (i = 0; i < argc - 2; i++) { argv[2 + i][rt_strlen(argv[2 + i])] = ' '; } } if (argc == 1) { flash_set_env(value, value); } else if (argc == 2) { flash_set_env(argv[1], value); } else { flash_set_env(argv[1], argv[2]); } }
NULL,空串,空指针
最新推荐文章于 2022-03-18 17:13:26 发布