diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/data_blob.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c index a4506fee45..1551879933 100644 --- a/source4/lib/data_blob.c +++ b/source4/lib/data_blob.c @@ -160,3 +160,16 @@ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, DATA_BLOB *blob) return hex_string; } + +/* + useful for constructing data blobs in test suites, while + avoiding const warnings +*/ +DATA_BLOB data_blob_string_const(const char *str) +{ + DATA_BLOB blob; + blob.data = discard_const(str); + blob.length = strlen(str); + return blob; +} + |