Reviewed-by: Steven Dake <sdake@xxxxxxxxxx> On 02/13/2012 04:23 AM, Angus Salkeld wrote: > Signed-off-by: Angus Salkeld <asalkeld@xxxxxxxxxx> > --- > test/sa_error.c | 70 ------------------------------------------------------- > test/sa_error.h | 5 ---- > 2 files changed, 0 insertions(+), 75 deletions(-) > delete mode 100644 test/sa_error.c > delete mode 100644 test/sa_error.h > > diff --git a/test/sa_error.c b/test/sa_error.c > deleted file mode 100644 > index 61924c7..0000000 > --- a/test/sa_error.c > +++ /dev/null > @@ -1,70 +0,0 @@ > -#include <config.h> > - > -#include <stdio.h> > -#include <string.h> > -#include <stdlib.h> > -#include <errno.h> > -#include "saAis.h" > - > -const char *sa_error_list[] = { > - "OUT_OF_RANGE", > - "CS_OK", > - "CS_ERR_LIBRARY", > - "CS_ERR_VERSION", > - "CS_ERR_INIT", > - "CS_ERR_TIMEOUT", > - "CS_ERR_TRY_AGAIN", > - "CS_ERR_INVALID_PARAM", > - "CS_ERR_NO_MEMORY", > - "CS_ERR_BAD_HANDLE", > - "CS_ERR_BUSY", > - "CS_ERR_ACCESS", > - "CS_ERR_NOT_EXIST", > - "CS_ERR_NAME_TOO_LONG", > - "CS_ERR_EXIST", > - "CS_ERR_NO_SPACE", > - "CS_ERR_INTERRUPT", > - "CS_ERR_NAME_NOT_FOUND", > - "CS_ERR_NO_RESOURCES", > - "CS_ERR_NOT_SUPPORTED", > - "CS_ERR_BAD_OPERATION", > - "CS_ERR_FAILED_OPERATION", > - "CS_ERR_MESSAGE_ERROR", > - "CS_ERR_QUEUE_FULL", > - "CS_ERR_QUEUE_NOT_AVAILABLE", > - "CS_ERR_BAD_CHECKPOINT", > - "CS_ERR_BAD_FLAGS", > - "CS_ERR_NO_SECTIONS", > -}; > - > -int get_sa_error(cs_error_t error, char *str, int len) > -{ > - if (error < CS_OK || > - error > CS_ERR_NO_SECTIONS || > - len < strlen(sa_error_list[error])) { > - errno = EINVAL; > - return -1; > - } > - strncpy(str, sa_error_list[error], len); > - if (len > 0) { > - str[len - 1] = '\0'; > - } > - return 0; > -} > - > -char *get_sa_error_b (cs_error_t error) { > - return ((char *)sa_error_list[error]); > -} > - > -char *get_test_output (cs_error_t result, cs_error_t expected) { > -static char test_result[256]; > - > - if (result == expected) { > - return ("PASSED"); > - } else { > - snprintf (test_result, sizeof(test_result), > - "FAILED expected %s got %s", > - get_sa_error_b(expected), get_sa_error_b(result)); > - return (test_result); > - } > -} > diff --git a/test/sa_error.h b/test/sa_error.h > deleted file mode 100644 > index f8114b3..0000000 > --- a/test/sa_error.h > +++ /dev/null > @@ -1,5 +0,0 @@ > -extern int get_sa_error(cs_error_t error, char *str, int len); > - > -extern char *get_sa_error_b (cs_error_t error); > - > -extern char *get_test_output (cs_error_t result, cs_error_t expected); _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss