X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_errno.c;h=3ff0456a58af4e286806dc599d882092b1ad4432;hb=1e2f8aca2cc108559fb9d823fc88dc342048500d;hp=920a2cf890b5128422aa3fdb1670fdd72f889501;hpb=a9de470cc7c0649221e156fc5f30a2dbdfe7c166;p=dpdk.git diff --git a/app/test/test_errno.c b/app/test/test_errno.c index 920a2cf890..3ff0456a58 100644 --- a/app/test/test_errno.c +++ b/app/test/test_errno.c @@ -18,7 +18,7 @@ test_errno(void) { const char *rte_retval; const char *libc_retval; -#ifdef RTE_EXEC_ENV_BSDAPP +#ifdef RTE_EXEC_ENV_FREEBSD /* BSD has a colon in the string, unlike linux */ const char unknown_code_result[] = "Unknown error: %d"; #else @@ -36,7 +36,7 @@ test_errno(void) if (rte_errno != 0) return -1; /* check for standard errors we return the same as libc */ - for (i = 0; i < sizeof(std_errs)/sizeof(std_errs[0]); i++){ + for (i = 0; i < RTE_DIM(std_errs); i++) { rte_retval = rte_strerror(std_errs[i]); libc_retval = strerror(std_errs[i]); printf("rte_strerror: '%s', strerror: '%s'\n", @@ -47,7 +47,7 @@ test_errno(void) /* for rte-specific errors ensure we return a different string * and that the string for libc is for an unknown error */ - for (i = 0; i < sizeof(rte_errs)/sizeof(rte_errs[0]); i++){ + for (i = 0; i < RTE_DIM(rte_errs); i++) { rte_retval = rte_strerror(rte_errs[i]); libc_retval = strerror(rte_errs[i]); printf("rte_strerror: '%s', strerror: '%s'\n",