From: Enrico Scholz Date: Wed, 5 May 2004 19:36:14 +0000 (+0000) Subject: removePrefix(): fixed another 'len' issue X-Git-Tag: VERSION_0_10~54 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c1e4aa88cd3f5b075014eac88241fe3a7459029;p=util-vserver.git removePrefix(): fixed another 'len' issue include git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1531 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/lib/bcaps-v13.c b/util-vserver/lib/bcaps-v13.c index a75f8cf..6a0a6db 100644 --- a/util-vserver/lib/bcaps-v13.c +++ b/util-vserver/lib/bcaps-v13.c @@ -26,6 +26,7 @@ #include #include +#include #include #ifndef CAP_QUOTACTL @@ -70,9 +71,9 @@ static struct Mapping_uint64 const VALUES[] = { inline static char const * removePrefix(char const *str, size_t *len) { - if ((len==0 || *len==0 || *len>=4) && + if ((len==0 || *len==0 || *len>4) && strncasecmp("cap_", str, 4)==0) { - if (len && *len>=4) *len -= 4; + if (len && *len>4) *len -= 4; return str+4; } else