]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
util: don't mark impure functions as pure
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 10 Mar 2021 09:05:37 +0000 (22:05 +1300)
committerJeremy Allison <jra@samba.org>
Thu, 11 Mar 2021 21:42:43 +0000 (21:42 +0000)
nothing that allocates memory can be pure, unless it guarantees to
allocate exactly the same pointer very time (which it does not).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/samba_util.h
lib/util/util.c

index f0bfa809d7bd7730313b392b81def81110c5ad33..4e279b72df166bf789433d0b508fb55d65744c6a 100644 (file)
@@ -237,12 +237,12 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t
 /** 
  * Parse a hex string and return a data blob. 
  */
-_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ;
+_PUBLIC_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ;
 
 /**
  * Parse a hex dump and return a data blob
  */
-_PUBLIC_ _PURE_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t len);
+_PUBLIC_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t len);
 
 /**
  * Print a buf in hex. Assumes dst is at least (srclen*2)+1 large.
index 57f19aaa1a16f920164d902eee2b017d025f2b44..7d7fb91e875637e6a6800d1c6f5270209babbb43 100644 (file)
@@ -900,7 +900,7 @@ _PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t
 /**
  * Parse a hex string and return a data blob.
  */
-_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) 
+_PUBLIC_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex)
 {
        DATA_BLOB ret_blob = data_blob_talloc(mem_ctx, NULL, strlen(strhex)/2+1);
 
@@ -916,7 +916,7 @@ _PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *s
  * is generated from dump_data_cb() elsewhere in this file
  * 
  */
-_PUBLIC_ _PURE_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t hexdump_len)
+_PUBLIC_ DATA_BLOB hexdump_to_data_blob(TALLOC_CTX *mem_ctx, const char *hexdump, size_t hexdump_len)
 {
        DATA_BLOB ret_blob = { 0 };
        size_t i = 0;