Skip to content

Commit 681dfee

Browse files
authored
Merge pull request #2554 from signalwire/allocator
[Core] switch_core_port_allocator_request_port: Coverity 1227622 Calling risky function
2 parents 060621e + 9d379b7 commit 681dfee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/switch_core_port_allocator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c
155155
uint32_t tries = 0;
156156

157157
/* randomly pick a port */
158-
index = rand() % alloc->track_len;
158+
index = switch_rand() % alloc->track_len;
159159

160160
/* if it is used walk up the list to find a free one */
161161
while (alloc->track[index] && tries < alloc->track_len) {

0 commit comments

Comments
 (0)