svn commit: samba r16374 - in trunk/source/lib: .
jra at samba.org
jra at samba.org
Mon Jun 19 23:19:21 GMT 2006
Author: jra
Date: 2006-06-19 23:19:19 +0000 (Mon, 19 Jun 2006)
New Revision: 16374
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16374
Log:
Klocwork #1670.
Jeremy.
Modified:
trunk/source/lib/util_str.c
Changeset:
Modified: trunk/source/lib/util_str.c
===================================================================
--- trunk/source/lib/util_str.c 2006-06-19 22:59:03 UTC (rev 16373)
+++ trunk/source/lib/util_str.c 2006-06-19 23:19:19 UTC (rev 16374)
@@ -2251,15 +2251,21 @@
SMB_BIG_UINT val = -1;
const char *p = nptr;
- while (p && *p && isspace(*p))
+ if (!p) {
+ *entptr = p;
+ return val;
+ }
+
+ while (*p && isspace(*p))
p++;
+
#ifdef LARGE_SMB_OFF_T
sscanf(p,"%llu",&val);
#else /* LARGE_SMB_OFF_T */
sscanf(p,"%lu",&val);
#endif /* LARGE_SMB_OFF_T */
if (entptr) {
- while (p && *p && isdigit(*p))
+ while (*p && isdigit(*p))
p++;
*entptr = p;
}
More information about the samba-cvs
mailing list