{
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
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",
/* 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",