I would have liked to get an ack, but the error this corrects is pretty
[coreboot.git] / util / options / build_opt_tbl.c
index f86090aeb49429e775dd4f48c1ccdcfdf105b39c..075387d1d8d89b5704261fa9620cc80ede77d6ef 100644 (file)
@@ -511,13 +511,13 @@ int main(int argc, char **argv)
                }
                /* write the array values */
                for(i=0;i<(ct->size-1);i++) {
-                       if(!(i%10) && !err) err=fwrite("\n\t",1,2,fp);
+                       if(!(i%10) && !err) err=!fwrite("\n\t",1,2,fp);
                        sprintf(buf,"0x%02x,",cmos_table[i]);
-                       if(!err) err=fwrite(buf,1,5,fp);
+                       if(!err) err=!fwrite(buf,1,5,fp);
                }
                /* write the end */
                sprintf(buf,"0x%02x\n",cmos_table[i]);
-               if(!err) err=fwrite(buf,1,4,fp);
+               if(!err) err=!fwrite(buf,1,4,fp);
                if(!fwrite("};\n",1,3,fp)) {
                        perror("Error - Could not write image file");
                        fclose(fp);