diff options
-rw-r--r-- | packaging/capi-system-peripheral-io.spec | 2 | ||||
-rw-r--r-- | test/peripheral-io-test.c | 8 | ||||
-rw-r--r-- | test/src/test_peripheral_i2c.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/packaging/capi-system-peripheral-io.spec b/packaging/capi-system-peripheral-io.spec index 8ff648b..b504225 100644 --- a/packaging/capi-system-peripheral-io.spec +++ b/packaging/capi-system-peripheral-io.spec @@ -1,6 +1,6 @@ Name: capi-system-peripheral-io Summary: Tizen Peripheral Input & Output library -Version: 0.4.1 +Version: 0.4.2 Release: 0 Group: System & System Tools License: Apache-2.0 diff --git a/test/peripheral-io-test.c b/test/peripheral-io-test.c index 364858e..f702930 100644 --- a/test/peripheral-io-test.c +++ b/test/peripheral-io-test.c @@ -102,14 +102,14 @@ static int __get_feature(const char *key, bool *feature) static bool __skip_check(char *name) { size_t n = sizeof(skip_test_list) / sizeof(skip_test_list[0]); - for (int i = 0; i < n; ++i) - if (!strcmp(skip_test_list[i].model_name, model_name) && !strcmp(skip_test_list[i].test_name, name)) + for (unsigned int u = 0; u < n; ++u) + if (!strcmp(skip_test_list[u].model_name, model_name) && !strcmp(skip_test_list[u].test_name, name)) return true; if (i2c_no_stub_driver) { n = sizeof(skip_test_list_i2c_no_stub_driver) / sizeof(skip_test_list_i2c_no_stub_driver[0]); - for (int i = 0; i < n; i++) - if (!strcmp(skip_test_list_i2c_no_stub_driver[i], name)) + for (unsigned int u = 0; u < n; u++) + if (!strcmp(skip_test_list_i2c_no_stub_driver[u], name)) return true; } return false; diff --git a/test/src/test_peripheral_i2c.c b/test/src/test_peripheral_i2c.c index d973fa1..00a0fef 100644 --- a/test/src/test_peripheral_i2c.c +++ b/test/src/test_peripheral_i2c.c @@ -61,7 +61,7 @@ static int __find_stub_driver(void) n = fread(name, sizeof(char), sizeof(name), fp); fclose(fp); - if (strncmp(name, "SMBus stub driver", n) == 0) { + if (n > 0 && strncmp(name, "SMBus stub driver", n) == 0) { ret = bus; goto cleanup; } |