Skip to content

Commit 4d2611e

Browse files
committed
Remove uses of uninitialized
1 parent 8066de5 commit 4d2611e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/MySQL.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ end
6767
Escapes a string using `mysql_real_escape_string()`, returns the escaped string.
6868
"""
6969
function escape(conn::MySQL.Connection, str::String)
70-
output = Vector{UInt8}(uninitialized, length(str) * 2 + 1)
70+
output = Vector{UInt8}(undef, length(str) * 2 + 1)
7171
output_len = API.mysql_real_escape_string(conn.ptr, output, str, Culong(length(str)))
7272
if output_len == typemax(Cuint)
7373
throw(MySQLInternalError(conn))

src/results.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ end
257257
Get a bind array for binding to results.
258258
"""
259259
function mysql_bind_array(meta::MySQLMetadata)
260-
bindarr = Vector{MYSQL_BIND}(uninitialized, meta.nfields)
260+
bindarr = Vector{MYSQL_BIND}(undef, meta.nfields)
261261
for i in 1:meta.nfields
262262
bufflen = zero(Culong)
263263
bindbuff = C_NULL

0 commit comments

Comments
 (0)