Browse code

lrkproxy: init variable and check to fix compiler warnings

Daniel-Constantin Mierla authored on 04/10/2022 14:11:50
Showing 1 changed files
... ...
@@ -1290,7 +1290,7 @@ static struct lrkp_set * select_lrkp_set(int id_set ){
1290 1290
 
1291 1291
 struct lrkp_node *select_lrkp_node(int do_test)
1292 1292
 {
1293
-    struct lrkp_node* node;
1293
+    struct lrkp_node* node = NULL;
1294 1294
     int was_forced;
1295 1295
     int was_forced2;
1296 1296
 
... ...
@@ -1391,7 +1391,7 @@ struct lrkp_node *select_lrkp_node(int do_test)
1391 1391
     }
1392 1392
 
1393 1393
     found:
1394
-    if (do_test) {
1394
+    if (do_test && node) {
1395 1395
 //    //todo...
1396 1396
         node->ln_enable = lrkp_test(node);
1397 1397
         if (!node->ln_enable)