Minor improvement to 'setErrMsg'
1. code like `char msg[] = "xxxxxx"` unnecessarily copied the string to stack, changed to `const char* msg = "xxxxxx"`. 2. the 2rd argument of `setErrMsg` is changed from `char*` to `const char*`. 3. the 3rd argument of `setErrMsg` is removed as `strncpy` stops copying at the end of source string.
Showing
想要评论请 注册 或 登录