Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2c Remove bogus initializer, and instead fix an =/=...



details:   https://anonhg.NetBSD.org/src/rev/02414dfaf12d
branches:  trunk
changeset: 554500:02414dfaf12d
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Wed Oct 29 00:34:58 2003 +0000

description:
Remove bogus initializer, and instead fix an =/== typo.

diffstat:

 sys/dev/i2c/i2c_exec.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8c82ba3ec84b -r 02414dfaf12d sys/dev/i2c/i2c_exec.c
--- a/sys/dev/i2c/i2c_exec.c    Tue Oct 28 23:56:00 2003 +0000
+++ b/sys/dev/i2c/i2c_exec.c    Wed Oct 29 00:34:58 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2c_exec.c,v 1.2 2003/10/25 21:33:36 christos Exp $    */
+/*     $NetBSD: i2c_exec.c,v 1.3 2003/10/29 00:34:58 mycroft Exp $     */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -60,7 +60,7 @@
 {
        const uint8_t *cmd = vcmd;
        uint8_t *buf = vbuf;
-       int error = 0;
+       int error;
        size_t len;
 
        /*
@@ -102,7 +102,7 @@
                        if ((len + 1) == buflen && cmdlen == 0 &&
                            (error = iic_initiate_xfer(tag, addr, flags)) != 0)
                                goto bad;
-                       if ((error == iic_write_byte(tag, *buf++, flags)) != 0)
+                       if ((error = iic_write_byte(tag, *buf++, flags)) != 0)
                                goto bad;
                }
        }



Home | Main Index | Thread Index | Old Index