[dpdk-dev] [PATCH] eal: cleanup strerror function

Bruce Richardson bruce.richardson at intel.com
Fri Sep 8 11:03:45 CEST 2017


On Thu, Sep 07, 2017 at 10:51:52AM -0700, Stephen Hemminger wrote:
> On Thu,  7 Sep 2017 14:09:56 +0100
> Bruce Richardson <bruce.richardson at intel.com> wrote:
> 
> > +	/* BSD puts a colon in the "unknown error" messages, Linux doesn't */
> > +#ifdef RTE_EXEC_ENV_BSDAPP
> > +	static const char *sep = ":";
> > +#else
> > +	static const char *sep = "";
> > +#endif
> 
> This is seems unnecessary to me just have the message be different.

I'd rather keep it consistent for the sake of the couple of lines of
code. What would be better is if there was a C variable we could use for
this to avoid macros, but I not aware of one right now that could work.
Again, open to suggestions on that. Even with keeping the macros, this
is still cleaner than the previous version.

/Bruce


More information about the dev mailing list