projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7253e3
)
Resolve type conflict
author
Nesterov Alexander
<nesoldr@mail.ru>
Wed, 20 May 2020 15:05:21 +0000
(18:05 +0300)
committer
Nesterov Alexander
<nesoldr@mail.ru>
Wed, 20 May 2020 15:05:27 +0000
(18:05 +0300)
3rdparty/quirc/src/quirc.c
patch
|
blob
|
history
diff --git
a/3rdparty/quirc/src/quirc.c
b/3rdparty/quirc/src/quirc.c
index
0cf5009
..
2499f8d
100644
(file)
--- a/
3rdparty/quirc/src/quirc.c
+++ b/
3rdparty/quirc/src/quirc.c
@@
-27,10
+27,7
@@
struct quirc *quirc_new(void)
{
struct quirc *q = malloc(sizeof(*q));
- if (!q)
- return NULL;
-
- memset(q, 0, sizeof(*q));
+ memset(q, 0, sizeof(*q));
return q;
}
@@
-123,8
+120,10
@@
static const char *const error_table[] = {
const char *quirc_strerror(quirc_decode_error_t err)
{
- if ((int)err >= 0 && (int)err < sizeof(error_table) / sizeof(error_table[0]))
- return error_table[err];
+ if ((int) err >= 0) {
+ if ((unsigned long) err < (unsigned long) (sizeof(error_table) / sizeof(error_table[0])))
+ return error_table[err];
+ }
-
return "Unknown error";
+ return "Unknown error";
}