@@ -1333,9 +1333,9 @@ err:;
1333
1333
}
1334
1334
1335
1335
static inline int check_leaf (struct trie * t , struct leaf * l , t_key key , int * plen , const struct flowi * flp ,
1336
- struct fib_result * res , int * err )
1336
+ struct fib_result * res )
1337
1337
{
1338
- int i ;
1338
+ int err , i ;
1339
1339
t_key mask ;
1340
1340
struct leaf_info * li ;
1341
1341
struct hlist_head * hhead = & l -> list ;
@@ -1348,18 +1348,18 @@ static inline int check_leaf(struct trie *t, struct leaf *l, t_key key, int *pl
1348
1348
if (l -> key != (key & mask ))
1349
1349
continue ;
1350
1350
1351
- if ((( * err ) = fib_semantic_match (& li -> falh , flp , res , l -> key , mask , i )) = = 0 ) {
1351
+ if ((err = fib_semantic_match (& li -> falh , flp , res , l -> key , mask , i )) < = 0 ) {
1352
1352
* plen = i ;
1353
1353
#ifdef CONFIG_IP_FIB_TRIE_STATS
1354
1354
t -> stats .semantic_match_passed ++ ;
1355
1355
#endif
1356
- return 1 ;
1356
+ return err ;
1357
1357
}
1358
1358
#ifdef CONFIG_IP_FIB_TRIE_STATS
1359
1359
t -> stats .semantic_match_miss ++ ;
1360
1360
#endif
1361
1361
}
1362
- return 0 ;
1362
+ return 1 ;
1363
1363
}
1364
1364
1365
1365
static int
@@ -1386,7 +1386,7 @@ fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result
1386
1386
1387
1387
/* Just a leaf? */
1388
1388
if (IS_LEAF (n )) {
1389
- if (check_leaf (t , (struct leaf * )n , key , & plen , flp , res , & ret ) )
1389
+ if (( ret = check_leaf (t , (struct leaf * )n , key , & plen , flp , res )) <= 0 )
1390
1390
goto found ;
1391
1391
goto failed ;
1392
1392
}
@@ -1508,7 +1508,7 @@ fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result
1508
1508
continue ;
1509
1509
}
1510
1510
if (IS_LEAF (n )) {
1511
- if (check_leaf (t , (struct leaf * )n , key , & plen , flp , res , & ret ) )
1511
+ if (( ret = check_leaf (t , (struct leaf * )n , key , & plen , flp , res )) <= 0 )
1512
1512
goto found ;
1513
1513
}
1514
1514
backtrace :
0 commit comments