projects
/
project
/
libnl-tiny.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
iron out all extra compiler warnings
[project/libnl-tiny.git]
/
attr.c
diff --git
a/attr.c
b/attr.c
index e0f50611cff9e94b5110a34ebfae32c86d47aba9..eae91e52bcacd7386999a978825a9dfff8a2fb3d 100644
(file)
--- a/
attr.c
+++ b/
attr.c
@@
-400,9
+400,11
@@
*/
int nla_ok(const struct nlattr *nla, int remaining)
{
- return remaining >= sizeof(*nla) &&
+ size_t r = remaining;
+
+ return r >= sizeof(*nla) &&
nla->nla_len >= sizeof(*nla) &&
- nla->nla_len <= r
emaining
;
+ nla->nla_len <= r;
}
/**