diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c new file mode 100644 index 00000000..39050c07 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c @@ -0,0 +1,52 @@ +int oldfoo(bar) + char bar; +{ + return bar -2; +} + +int i2c_use_client(struct i2c_client *client) +{ + int ret; + + ret = i2c_inc_use_client(client); + if (ret) + return ret; + + if ((client->flags & I2C_CLIENT_ALLOW_USE) || (a && + something_else)) + { + if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE) + client->usage_count++; + else if (client->usage_count > 0) + goto busy; + else + client->usage_count++; + } + + return 0; + busy: + i2c_dec_use_client(client); + return -EBUSY; +} + +void get_name(void) +{ + a = (int)5; + + if (a) + if (b) + b--; + else + { + a++; + } + for (a=0; a < 10; a++) + if (b) + { + b--; + } + else + a++; + return; +} + |