Ticket #48800 - Cleaning up error buffers
Description: The changes in this patch is mainly one of these,
1. unifying error buffer size to SLAPI_DSE_RETURNTEXT_SIZE.
An error buf is filled either in config, mapping-tree, log, pass-
word code, where the size SLAPI_DSE_RETURNTEXT_SIZE is expected,
while some callers declare BUFSIZ array and pass it.
Note: SLAPI_DSE_RETURNTEXT_SIZE is defined as 512 in slapi-plugin.h.
2. replacing PR_snprintf with slapi_create_errormsg.
slapi_create_errormsg is almost the same as PR_snprintf except
2-1 the former does not do anything if the place to write the error
message is NULL. With this change, we can skip returning an
error message if it is not needed.
2-2 If buffer size 0 is given, sizeof(buffer) is used as the size
of buffer. The strict size is supposed to be passed only when
the error buffer is allocated on the heap.
3. Avoiding unnecessary array.
Caller sometimes declares an error buffer even though it does not
use it. This patch removed such error buffer declaration or moved
it in the local block where it is being used.
https://fedorahosted.org/389/ticket/48800
Reviewed by wibrown@redhat.com (Thank you, William!!)