On Wed, 2012-02-15 at 12:52 +0100, Pavel Březina wrote: > The behaviour is the same in the most majority of cases. But it > differs > in following situation: > char *str = talloc_strdup(NULL, "hello world"); > str[5] = '\0'; > > str = talloc_strdup_append(str, "..."); /* hello... */ > str = _append_buffer(str, "..."); /* hello\0world... */ > This is the reason we did not use it. append_buffer can quickly add very subtle bugs. So if you want to use it I think we should do it as an auxiliary function wrapped around it that guarantees we are not doing things like setting a 0 in the middle of the string, which is a rather common thing when you are manipulating strings.
Simo. -- Simo Sorce * Red Hat, Inc * New York _______________________________________________ sssd-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/sssd-devel
