Hello. On Thu, 2012-03-01 at 17:09, Patryk Benderz wrote: > > > Why should they be in a define? The compiler detects if the variables > > are constant and optimizes this case anyway. > I take that argument. I was not aware that present compilers do such > job. It was long ago (20 years) when was interested how compilers work, > and it was Pascal compilers at the beginning.
https://en.wikipedia.org/wiki/Constant_folding > > Other tools have been able to decode a suffix I added with this code. > ...well, since you say so, I have no more concern. I only have access to a limited set of tools and firmware images. (dfutool from the bluez project, the dfu suffix reference handling code from the spec and some firmware image I found on the net claiming to have a valid DFU suffix and working with with both test tools) If anyone has access to more DFU tools, perhaps under windows, and or images that are known to have a correct suffix I would be glad to hear test results. > > Maybe I'm biased due to some kernel work here but in my opinion it > > looks cleaner and is easier to understand instead of repeating the > > failure code all the time. > I understand. Probably compiler also takes care of that, right? Well, haven't thought about that. Just got used to goto for failure handling in init and I'm happy with it for this one use case. :) regards Stefan Schmidt _______________________________________________ devel mailing list devel@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/devel