diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs.c')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs.c b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs.c new file mode 100644 index 00000000..d75a4782 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs.c @@ -0,0 +1,35 @@ +typedef struct { + int a; + char b; +} foo_t; + +s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, u8 command, u8 *values) +{ + union i2c_smbus_data data; + int i; + if (i2c_smbus_xfer(client->adapter,client->addr,client->flags, + I2C_SMBUS_READ,command, + I2C_SMBUS_I2C_BLOCK_DATA,&data)) + return -1; + else { + for (i=1;i<=data.block[0];i ++) + values[i-1] = data.block[i]; + return data.block[0]; + } +} + +void foo(void) +{ + adap->nr= id & MAX_ID_MASK; + + list_for_each(item,&drivers) { + driver=list_entry(item, struct i2c_driver, list); + if (driver->detach_adapter) + if ((res = driver->detach_adapter(adap))) + { + dev_err(&adap->dev, "detach_adapter failed " + "for driver [%s]\n", driver->name); + goto out_unlock; + } + } +} |