diff options
| author | mycroft <mycroft@NetBSD.org> | 2003-10-29 00:34:58 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 2003-10-29 00:34:58 +0000 |
| commit | dc3fafca35d5cb47770a6b905eccbc0933a4099a (patch) | |
| tree | 3173135c79f75ea9bc732d091a773e7f6756cfb3 /sys/dev/i2c | |
| parent | 39c696c2e6982f98911fac635e2fca914a3b71cb (diff) | |
Remove bogus initializer, and instead fix an =/== typo.
Diffstat (limited to 'sys/dev/i2c')
| -rw-r--r-- | sys/dev/i2c/i2c_exec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/i2c/i2c_exec.c b/sys/dev/i2c/i2c_exec.c index 7032b0a6c9e..6b2483b07b4 100644 --- a/sys/dev/i2c/i2c_exec.c +++ b/sys/dev/i2c/i2c_exec.c @@ -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 @@ iic_exec(i2c_tag_t tag, i2c_op_t op, i2c_addr_t addr, const void *vcmd, { const uint8_t *cmd = vcmd; uint8_t *buf = vbuf; - int error = 0; + int error; size_t len; /* @@ -102,7 +102,7 @@ iic_exec(i2c_tag_t tag, i2c_op_t op, i2c_addr_t addr, const void *vcmd, 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; } } |
