Follow-up Comment #13, patch #7486 (project avrdude):

Minor notes while I'm making a final cosmetic sweep over the
code (prior to committing it):

. Please eventually turn the toplevel static variables into
  per-programmer private data (see other programmers about
  that); I'll commit the code as is, but they should go away.

. I removed all trailing white spaces, and tried to unify
  the style quite a bit (in general, this means a lot of
  added white space around arithmetic operators, after an
  "if" etc.), as well as limit the line length where possible.

. __FUNCTION__ is a GCC extension (C99 names it __func__).
  As it's only been used once, I inserted the (well-known
  at this place) function name manually.

. A failed malloc() does never set errno, so there's no point
  in evaluating it in the error message.

. Use the ! operator within a condition only to express a
  logical negation, rather than as a lazy shortcut for == 0
  (which is simply more descriptive to humans).

. The various exit() statements should probably be avoided
  wherever possible (the code goes into a library!), replaced
  by error returns which of course have to be handled by the
  caller.

Please double-check I did not break anything.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7486>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to