Return a duplicate of the source address. */
| 620 | |
| 621 | /* Return a duplicate of the source address. */ |
| 622 | sentinelAddr *dupSentinelAddr(sentinelAddr *src) { |
| 623 | sentinelAddr *sa; |
| 624 | |
| 625 | sa = (sentinelAddr*)zmalloc(sizeof(*sa), MALLOC_LOCAL); |
| 626 | sa->hostname = sdsnew(src->hostname); |
| 627 | sa->ip = sdsnew(src->ip); |
| 628 | sa->port = src->port; |
| 629 | return sa; |
| 630 | } |
| 631 | |
| 632 | /* Free a Sentinel address. Can't fail. */ |
| 633 | void releaseSentinelAddr(sentinelAddr *sa) { |
no test coverage detected