From patchwork Mon May 9 13:50:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fixes the build error while generating option_table.h Date: Mon, 09 May 2011 13:50:02 -0000 From: Vikram Narayanan X-Patchwork-Id: 2958 Message-Id: <4DC7F10A.6010402@gmail.com> To: coreboot@coreboot.org Cc: Peter Stuge > Am 08.05.2011 20:01, schrieb Peter Stuge: >> if(!strncmp(line[strspn(line," ")],"\r\n",2) continue; > More like: > char val=line[strspn(line," ")]; > if (val=='#' || val=='\n' || val=='\r') continue; > > This has the benefit of handling > " # comment" > and mac-style newlines, too. Thanks for all your comments. As Patrick suggested, here is the new patch. Signed-off by: Vikram Narayanan Signed-off by: Patrick Georgi Acked-by: Paul Menzel --- - Thanks, Vikram --- C:/coreboot/util/options/build_opt_tbl.c.orig Sun May 8 22:18:54 2011 +++ C:/coreboot/util/options/build_opt_tbl.c Mon May 9 19:09:32 2011 @@ -276,6 +276,7 @@ int enum_length; int len; char buf[16]; + char val; for(i=1;ibit,&ce->length,&uc,&ce->config_id,&ce->name[0]);