Author: hailfinger
Date: Mon Dec  6 14:05:44 2010
New Revision: 1246
URL: http://flashrom.org/trac/flashrom/changeset/1246

Log:
Simplify get_next_write in the partial write code.

Suggested by Michael Karcher.

Signed-off-by: Carl-Daniel Hailfinger <[email protected]>
Acked-by: Michael Karcher <[email protected]>

Modified:
   trunk/flashrom.c

Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c    Sun Dec  5 17:33:59 2010        (r1245)
+++ trunk/flashrom.c    Mon Dec  6 14:05:44 2010        (r1246)
@@ -928,13 +928,11 @@
                                /* First location where have and want
                                 * do not differ anymore.
                                 */
-                               first_len = i * stride - rel_start;
                                break;
                        }
                }
        }
-       /* Did the loop terminate without setting first_len? */
-       if (need_write && ! first_len)
+       if (need_write)
                first_len = min(i * stride - rel_start, len);
        *first_start += rel_start;
        return first_len;

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to