diff options
author | Michael Biebl <biebl@debian.org> | 2013-03-18 15:39:58 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2013-03-18 15:39:58 +0100 |
commit | 86831d7a4f485e19befa8cc500d17766798ad07c (patch) | |
tree | 67b3cc93fcf2734e594c4e0c11609eaf1359e0f8 /runtime/stringbuf.c | |
parent | ac1a840d0afd724fa614eed5d64112a9ecf097f8 (diff) | |
download | rsyslog-86831d7a4f485e19befa8cc500d17766798ad07c.tar.gz |
Imported Upstream version 7.3.8upstream/7.3.8
Diffstat (limited to 'runtime/stringbuf.c')
-rw-r--r-- | runtime/stringbuf.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/runtime/stringbuf.c b/runtime/stringbuf.c index 5bca009..d9f8023 100644 --- a/runtime/stringbuf.c +++ b/runtime/stringbuf.c @@ -870,13 +870,7 @@ int rsCStrSzStrCmp(cstr_t *pCS1, uchar *psz, size_t iLenSz) * length, so we need to actually check if they * are equal. */ - register size_t i; - for(i = 0 ; i < iLenSz ; ++i) { - if(pCS1->pBuf[i] != psz[i]) - return pCS1->pBuf[i] - psz[i]; - } - /* if we arrive here, the strings are equal */ - return 0; + return strncmp((char*)pCS1->pBuf, (char*)psz, iLenSz); } else return pCS1->iStrLen - iLenSz; |