[PATCH 10/16] add file detection support

Sascha Hauer s.hauer at pengutronix.de
Tue Nov 29 14:41:32 EST 2011


On Tue, Nov 29, 2011 at 12:10:01AM +0100, Marc Kleine-Budde wrote:
> > +
> > +const char *file_type_to_string(enum filetype f)
> > +{
> 
> you can use an const array char pointers here:
> 
> static const char *filetype_str[] = {
>         [filetype_unknown] = "unknown",
> ...
> }

I thought this myself when seeing the result. I was too lazy...

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list