提交 f8818e5b 编写于 作者: dengyihao's avatar dengyihao

coverity issue

上级 342fa888
...@@ -239,7 +239,10 @@ char* strntolower(char *dst, const char *src, int32_t n) { ...@@ -239,7 +239,10 @@ char* strntolower(char *dst, const char *src, int32_t n) {
char quote = 0, *p = dst, c; char quote = 0, *p = dst, c;
assert(dst != NULL); assert(dst != NULL);
if (n == 0) {
*p = 0;
return dst;
}
for (c = *src++; n-- > 0; c = *src++) { for (c = *src++; n-- > 0; c = *src++) {
if (esc) { if (esc) {
esc = 0; esc = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册