[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Fri Dec 26 17:28:03 MST 2014
The branch, master has been updated
via bf1ad50 lib: Use talloc_zero_array instead of memset
from d1cae6b Fix a comment to indicate that TALLOC_FREE must be used to free an allocated array of strings.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit bf1ad5051faf8e37757c12c3c42c176fe87a3ad2
Author: Volker Lendecke <vl at samba.org>
Date: Fri Dec 26 19:41:23 2014 +0000
lib: Use talloc_zero_array instead of memset
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Sat Dec 27 01:27:08 CET 2014 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
lib/util/util_file.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/util_file.c b/lib/util/util_file.c
index 83c746b..b9d7bdd 100644
--- a/lib/util/util_file.c
+++ b/lib/util/util_file.c
@@ -282,7 +282,7 @@ char **file_lines_parse(char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx
if (s[0] == '\n') i++;
}
- ret = talloc_array(mem_ctx, char *, i+2);
+ ret = talloc_zero_array(mem_ctx, char *, i+2);
if (!ret) {
talloc_free(p);
return NULL;
@@ -290,8 +290,6 @@ char **file_lines_parse(char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx
talloc_steal(ret, p);
- memset(ret, 0, sizeof(ret[0])*(i+2));
-
ret[0] = p;
for (s = p, i=0; s < p+size; s++) {
if (s[0] == '\n') {
--
Samba Shared Repository
More information about the samba-cvs
mailing list