svn commit: samba r16375 - in branches/SAMBA_3_0/source/lib: .
jra at samba.org
jra at samba.org
Mon Jun 19 23:19:24 GMT 2006
Author: jra
Date: 2006-06-19 23:19:24 +0000 (Mon, 19 Jun 2006)
New Revision: 16375
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16375
Log:
Klocwork #1670.
Jeremy.
Modified:
branches/SAMBA_3_0/source/lib/util_str.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/util_str.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_str.c 2006-06-19 23:19:19 UTC (rev 16374)
+++ branches/SAMBA_3_0/source/lib/util_str.c 2006-06-19 23:19:24 UTC (rev 16375)
@@ -2250,15 +2250,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