diff options
| author | paco <paco@voltanet.io> | 2018-06-18 19:07:24 +0200 | 
|---|---|---|
| committer | paco <paco@voltanet.io> | 2018-06-18 19:07:24 +0200 | 
| commit | d11c6941dc5e3663891e61a4e24f94b4d0e6bd68 (patch) | |
| tree | ebbd6ab6492b790eb742d0bf1ff9d8b98b862d92 /babeld | |
| parent | 36de1d53b87eccb7f6ceaf12f74a55981c35b9b7 (diff) | |
babeld, eigrpd, ospfd: unsigned negative check
After Cppcheck 1.72 feedback
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'babeld')
| -rw-r--r-- | babeld/message.c | 2 | ||||
| -rw-r--r-- | babeld/neighbour.c | 2 | 
2 files changed, 2 insertions, 2 deletions
diff --git a/babeld/message.c b/babeld/message.c index 1ff4867908..95b4e87cc7 100644 --- a/babeld/message.c +++ b/babeld/message.c @@ -662,7 +662,7 @@ static int  check_bucket(struct interface *ifp)  {      babel_interface_nfo *babel_ifp = babel_get_if_nfo(ifp); -    if(babel_ifp->bucket <= 0) { +    if(babel_ifp->bucket == 0) {          int seconds = babel_now.tv_sec - babel_ifp->bucket_time;          if(seconds > 0) {              babel_ifp->bucket = MIN(BUCKET_TOKENS_MAX, diff --git a/babeld/neighbour.c b/babeld/neighbour.c index 48a32c4a9c..3db121fd26 100644 --- a/babeld/neighbour.c +++ b/babeld/neighbour.c @@ -120,7 +120,7 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)      int rc = 0;      if(hello < 0) { -        if(neigh->hello_interval <= 0) +        if(neigh->hello_interval == 0)              return rc;          missed_hellos =              ((int)timeval_minus_msec(&babel_now, &neigh->hello_time) -  | 
