lib/util Rename conv_str_size() -> conv_str_size_error()
authorAndrew Bartlett <abartlet@samba.org>
Sat, 30 Apr 2011 03:10:18 +0000 (13:10 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 30 Apr 2011 08:38:25 +0000 (10:38 +0200)
lib/util/util.h
lib/util/util_str.c
source4/client/cifsdd.c
source4/param/loadparm.c

index 8bbaa0e393ec1c2ce2110ca25eb9805f4fcef4f4..8dffece0dad2217bccf77b327f4be0502a7dabef 100644 (file)
@@ -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
index cf1b07ff0fa01052e4a6b811fb3d512b6e144cef..cf3d60df8fa37ac50edb5d662486f320c0a4110c 100644 (file)
@@ -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;
index adf2d72af24732e4beb27f73a25fb7f47de06c22..3ce7277614be695ea30282590c43c37969d1ffb0 100644 (file)
@@ -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;
index c8c0b193bc922719ab8c1c14bc240001c33018e8..0f60e4364b0bade35993e99f8a6be17c5f75d3db 100644 (file)
@@ -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;