Skip to content

Commit 50720f6

Browse files
authored
Merge pull request #2556 from signalwire/maria
[mod_mariadb] mariadb_send_query: Coverity 1518917 Calling risky function
2 parents 8e3d398 + 251da2f commit 50720f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mod/databases/mod_mariadb/mod_mariadb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ switch_status_t mariadb_send_query(mariadb_handle_t *handle, const char* sql)
641641
switch_safe_free(err_str);
642642
/* We are waiting for 500 ms and random time is not more than 500 ms.
643643
This is necessary so that the delay on the primary and secondary servers does not coincide and deadlock does not occur again. */
644-
switch_yield(500 + (rand() & 511));
644+
switch_yield(500 + (switch_rand() & 511));
645645
goto again;
646646
}
647647

0 commit comments

Comments
 (0)