File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -551,13 +551,10 @@ class CAddrMan
551551 // ! Randomly select an address in tried that another address is attempting to evict.
552552 CAddrInfo SelectTriedCollision ()
553553 {
554- CAddrInfo ret;
555- {
556- LOCK (cs);
557- Check ();
558- ret = SelectTriedCollision_ ();
559- Check ();
560- }
554+ LOCK (cs);
555+ Check ();
556+ const CAddrInfo ret = SelectTriedCollision_ ();
557+ Check ();
561558 return ret;
562559 }
563560
@@ -566,13 +563,10 @@ class CAddrMan
566563 */
567564 CAddrInfo Select (bool newOnly = false )
568565 {
569- CAddrInfo addrRet;
570- {
571- LOCK (cs);
572- Check ();
573- addrRet = Select_ (newOnly);
574- Check ();
575- }
566+ LOCK (cs);
567+ Check ();
568+ const CAddrInfo addrRet = Select_ (newOnly);
569+ Check ();
576570 return addrRet;
577571 }
578572
You can’t perform that action at this time.
0 commit comments