This is the only place it is used.
After migrating to Samba's lib/util, the lock helper can be changed to
use strhex_to_data_blob().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(Imported from commit
94a5e28ffb53a268865666038678e78cbbb39de3)
double timeval_delta(struct timeval *tv2, struct timeval *tv);
char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
-uint8_t *hex_decode_talloc(TALLOC_CTX *mem_ctx, const char *hex_in, size_t *len);
_PUBLIC_ int set_blocking(int fd, bool set);
#include "lib/util/debug.h"
return hex_buffer;
}
-
-uint8_t *hex_decode_talloc(TALLOC_CTX *mem_ctx, const char *hex_in, size_t *len)
-{
- int i, num;
- uint8_t *buffer;
-
- *len = strlen(hex_in) / 2;
- buffer = talloc_array(mem_ctx, unsigned char, *len);
-
- for (i=0; i<*len; i++) {
- sscanf(&hex_in[i*2], "%02X", &num);
- buffer[i] = (uint8_t)num;
- }
-
- return buffer;
-}
progname);
}
+static uint8_t *hex_decode_talloc(TALLOC_CTX *mem_ctx,
+ const char *hex_in, size_t *len)
+{
+ int i, num;
+ uint8_t *buffer;
+
+ *len = strlen(hex_in) / 2;
+ buffer = talloc_array(mem_ctx, unsigned char, *len);
+
+ for (i=0; i<*len; i++) {
+ sscanf(&hex_in[i*2], "%02X", &num);
+ buffer[i] = (uint8_t)num;
+ }
+
+ return buffer;
+}
static int lock_record(const char *dbpath, const char *dbflags, const char *dbkey)
{