summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-30 13:10:18 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-30 10:38:25 +0200
commitbcd68837ee308aa4610a4c85783a4b64a349d4f9 (patch)
tree7a904125178ff906b793a05894adf9f9f4308ea3
parent944929bb69e2a4ef15f6fb7b4e5c37ab90fe93da (diff)
downloadsamba-bcd68837ee308aa4610a4c85783a4b64a349d4f9.tar.gz
samba-bcd68837ee308aa4610a4c85783a4b64a349d4f9.tar.bz2
samba-bcd68837ee308aa4610a4c85783a4b64a349d4f9.zip
lib/util Rename conv_str_size() -> conv_str_size_error()
-rw-r--r--lib/util/util.h4
-rw-r--r--lib/util/util_str.c2
-rw-r--r--source4/client/cifsdd.c2
-rw-r--r--source4/param/loadparm.c4
4 files changed, 5 insertions, 7 deletions
diff --git a/lib/util/util.h b/lib/util/util.h
index 8bbaa0e393..8dffece0da 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -371,12 +371,10 @@ _PUBLIC_ bool set_boolean(const char *boolean_string, bool *boolean);
*/
_PUBLIC_ bool conv_str_bool(const char * str, bool * val);
-#if _SAMBA_BUILD_ == 4
/**
* Convert a size specification like 16K into an integral number of bytes.
**/
-_PUBLIC_ bool conv_str_size(const char * str, uint64_t * val);
-#endif
+_PUBLIC_ bool conv_str_size_error(const char * str, uint64_t * val);
/**
* Parse a uint64_t value from a string
diff --git a/lib/util/util_str.c b/lib/util/util_str.c
index cf1b07ff0f..cf3d60df8f 100644
--- a/lib/util/util_str.c
+++ b/lib/util/util_str.c
@@ -175,7 +175,7 @@ _PUBLIC_ bool conv_str_bool(const char * str, bool * val)
/**
* Convert a size specification like 16K into an integral number of bytes.
**/
-_PUBLIC_ bool conv_str_size(const char * str, uint64_t * val)
+_PUBLIC_ bool conv_str_size_error(const char * str, uint64_t * val)
{
char * end = NULL;
unsigned long long lval;
diff --git a/source4/client/cifsdd.c b/source4/client/cifsdd.c
index adf2d72af2..3ce7277614 100644
--- a/source4/client/cifsdd.c
+++ b/source4/client/cifsdd.c
@@ -152,7 +152,7 @@ int set_arg_argv(const char * argv)
}
break;
case ARG_SIZE:
- if (!conv_str_size(val, &arg->arg_val.nval)) {
+ if (!conv_str_size_error(val, &arg->arg_val.nval)) {
goto fail;
}
break;
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index c8c0b193bc..0f60e4364b 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -949,7 +949,7 @@ int lpcfg_parm_bytes(struct loadparm_context *lp_ctx,
const char *value = lpcfg_get_parametric(lp_ctx, service, type, option);
- if (value && conv_str_size(value, &bval)) {
+ if (value && conv_str_size_error(value, &bval)) {
if (bval <= INT_MAX) {
return (int)bval;
}
@@ -1662,7 +1662,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr,
case P_BYTES:
{
uint64_t val;
- if (conv_str_size(pszParmValue, &val)) {
+ if (conv_str_size_error(pszParmValue, &val)) {
if (val <= INT_MAX) {
*(int *)parm_ptr = (int)val;
break;