avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] [RFC] stk500: skip empty pages


From: Theodore A. Roth
Subject: Re: [avrdude-dev] [RFC] stk500: skip empty pages
Date: Tue, 16 Sep 2003 13:46:12 -0700 (PDT)


On Tue, 16 Sep 2003, E.Weddington wrote:

> > On Tue, Sep 16, 2003 at 05:38:10PM +0000, E.Weddington
> wrote:
> >
> > > See attached.
> >
> > Looks good!
> >
>
> Ok, this time, the redundant strcmps are worked around. See
> attached. Let me know if ok to commit.

Why introduce the flash variable? Can't you just use

  if (memtype == 'F')

to get the same result?

Instead of this:

+    /* Only skip on empty page if programming flash. */
+    if (flash) {
+      if (stk500_is_page_empty(addr, page_size, m->buf)) {
+          continue;
+      }

I'd use this:

+    /* Only skip on empty page if programming flash. */
+    if ((memtype == 'F') && stk500_is_page_empty(addr, page_size, m->buf)) {
+        continue;
+    }

Don't forget the spaces after if and for.

Ted Roth




reply via email to

[Prev in Thread] Current Thread [Next in Thread]