svn commit: samba r22285 - in branches: SAMBA_3_0/source/param SAMBA_3_0_25/source/param

jra at samba.org jra at samba.org
Mon Apr 16 22:42:46 GMT 2007


Author: jra
Date: 2007-04-16 22:42:45 +0000 (Mon, 16 Apr 2007)
New Revision: 22285

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22285

Log:
Allow arbitrary bases in int and ulong parsing.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0_25/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===================================================================
--- branches/SAMBA_3_0/source/param/loadparm.c	2007-04-16 22:19:51 UTC (rev 22284)
+++ branches/SAMBA_3_0/source/param/loadparm.c	2007-04-16 22:42:45 UTC (rev 22285)
@@ -2232,7 +2232,7 @@
 		return (-1);
 	}
 
-	return atoi(s); 
+	return (int)strtol(s, NULL, 0);
 }
 
 /*******************************************************************
@@ -2246,7 +2246,7 @@
 		return (0);
 	}
 
-	return strtoul(s, NULL, 10);
+	return strtoul(s, NULL, 0);
 }
 
 /*******************************************************************

Modified: branches/SAMBA_3_0_25/source/param/loadparm.c
===================================================================
--- branches/SAMBA_3_0_25/source/param/loadparm.c	2007-04-16 22:19:51 UTC (rev 22284)
+++ branches/SAMBA_3_0_25/source/param/loadparm.c	2007-04-16 22:42:45 UTC (rev 22285)
@@ -2229,7 +2229,7 @@
 		return (-1);
 	}
 
-	return atoi(s); 
+	return (int)strtol(s, NULL, 0);
 }
 
 /*******************************************************************
@@ -2243,7 +2243,7 @@
 		return (0);
 	}
 
-	return strtoul(s, NULL, 10);
+	return strtoul(s, NULL, 0);
 }
 
 /*******************************************************************



More information about the samba-cvs mailing list