diff options
author | Günther Deschner <gd@samba.org> | 2013-12-10 23:44:23 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2013-12-12 13:34:50 +0100 |
commit | bc870ee8453640049827136d48f49b9e6cccc594 (patch) | |
tree | 2ab48ec6c72adcc6cd4913b947238564ce7e9359 /libgpo | |
parent | feffac806800c1740521133e88a7ac777ce8f368 (diff) | |
download | samba-bc870ee8453640049827136d48f49b9e6cccc594.tar.gz |
libgpo: remove use of deprecated talloc functions.
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'libgpo')
-rw-r--r-- | libgpo/gpo_util.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c index 43526eda893..315105faee8 100644 --- a/libgpo/gpo_util.c +++ b/libgpo/gpo_util.c @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#define TALLOC_DEPRECATED 1 + #include "includes.h" #include "system/filesys.h" #include "librpc/gen_ndr/ndr_misc.h" @@ -762,24 +762,29 @@ char *gpo_flag_str(TALLOC_CTX *ctx, uint32_t flags) return NULL; } + str = talloc_strdup(ctx, ""); + if (!str) { + return NULL; + } + if (flags & GPO_INFO_FLAG_SLOWLINK) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_SLOWLINK "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_SLOWLINK "); if (flags & GPO_INFO_FLAG_VERBOSE) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_VERBOSE "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_VERBOSE "); if (flags & GPO_INFO_FLAG_SAFEMODE_BOOT) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_SAFEMODE_BOOT "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_SAFEMODE_BOOT "); if (flags & GPO_INFO_FLAG_NOCHANGES) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_NOCHANGES "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_NOCHANGES "); if (flags & GPO_INFO_FLAG_MACHINE) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_MACHINE "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_MACHINE "); if (flags & GPO_INFO_FLAG_LOGRSOP_TRANSITION) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_LOGRSOP_TRANSITION "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_LOGRSOP_TRANSITION "); if (flags & GPO_INFO_FLAG_LINKTRANSITION) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_LINKTRANSITION "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_LINKTRANSITION "); if (flags & GPO_INFO_FLAG_FORCED_REFRESH) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_FORCED_REFRESH "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_FORCED_REFRESH "); if (flags & GPO_INFO_FLAG_BACKGROUND) - str = talloc_append_string(ctx, str, "GPO_INFO_FLAG_BACKGROUND "); + str = talloc_strdup_append(str, "GPO_INFO_FLAG_BACKGROUND "); return str; } |