aboutsummaryrefslogtreecommitdiffstats
path: root/utils/common
diff options
context:
space:
mode:
Diffstat (limited to 'utils/common')
-rw-r--r--utils/common/keymap.c4
-rw-r--r--utils/common/toml.c6
-rw-r--r--utils/common/v4l-stream.c3
3 files changed, 8 insertions, 5 deletions
diff --git a/utils/common/keymap.c b/utils/common/keymap.c
index fa8f256f..47d36152 100644
--- a/utils/common/keymap.c
+++ b/utils/common/keymap.c
@@ -527,8 +527,8 @@ error_t parse_keymap(char *fname, struct keymap **keymap, bool verbose)
if (len >= 5 && strcasecmp(fname + len - 5, ".toml") == 0)
return parse_toml_keymap(fname, keymap, verbose);
- else
- return parse_plain_keymap(fname, keymap, verbose);
+
+ return parse_plain_keymap(fname, keymap, verbose);
}
int keymap_param(struct keymap *map, const char *name, int fallback)
diff --git a/utils/common/toml.c b/utils/common/toml.c
index 2a9f3dac..68cebef9 100644
--- a/utils/common/toml.c
+++ b/utils/common/toml.c
@@ -1697,7 +1697,8 @@ int toml_rtots(const char* src_, toml_timestamp_t* ret)
for (i = 0; i < 10; i++, p++) {
int xx = *p;
if (xx == '-') {
- if (i == 4 || i == 7) continue; else return -1;
+ if (i == 4 || i == 7) continue;
+ return -1;
}
if (! ('0' <= xx && xx <= '9')) return -1;
val = val * 10 + (xx - '0');
@@ -1724,7 +1725,8 @@ int toml_rtots(const char* src_, toml_timestamp_t* ret)
for (i = 0; i < 8; i++, p++) {
int xx = *p;
if (xx == ':') {
- if (i == 2 || i == 5) continue; else return -1;
+ if (i == 2 || i == 5) continue;
+ return -1;
}
if (! ('0' <= xx && xx <= '9')) return -1;
val = val * 10 + (xx - '0');
diff --git a/utils/common/v4l-stream.c b/utils/common/v4l-stream.c
index c2f2abce..44ee137e 100644
--- a/utils/common/v4l-stream.c
+++ b/utils/common/v4l-stream.c
@@ -88,7 +88,8 @@ void rle_decompress(__u8 *b, unsigned size, unsigned rle_size, unsigned bpl)
i += 4;
next_line = dst + bpl / 4;
continue;
- } else if (v == magic_x) {
+ }
+ if (v == magic_x) {
v = *++p;
n = ntohl(*++p);
i += 8;

Privacy Policy