Commit b27b336
src: remove ParseIP() in cares_wrap.cc
This function is only used in one place where the result argument is
never nullptr, so remove special handling of that case. Also, instead
of returning magic values 0/4/6 and then later translating those into
error/AF_INET/AF_INET6, use AF_INET/AF_INET6 directly. Lastly, inline
the function, which is simpler overall.
PR-URL: #44771
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>1 parent 143c428 commit b27b336
1 file changed
+6
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1533 | 1533 | | |
1534 | 1534 | | |
1535 | 1535 | | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | 1536 | | |
1548 | 1537 | | |
1549 | 1538 | | |
1550 | 1539 | | |
1551 | | - | |
1552 | | - | |
1553 | | - | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
1554 | 1545 | | |
1555 | 1546 | | |
1556 | | - | |
1557 | | - | |
| 1547 | + | |
1558 | 1548 | | |
1559 | 1549 | | |
1560 | 1550 | | |
| |||
0 commit comments