Skip to content

Commit

Permalink
Remove uses of uninitialized
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Aug 16, 2018
1 parent 8066de5 commit 4d2611e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MySQL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ end
Escapes a string using `mysql_real_escape_string()`, returns the escaped string.
"""
function escape(conn::MySQL.Connection, str::String)
output = Vector{UInt8}(uninitialized, length(str) * 2 + 1)
output = Vector{UInt8}(undef, length(str) * 2 + 1)
output_len = API.mysql_real_escape_string(conn.ptr, output, str, Culong(length(str)))
if output_len == typemax(Cuint)
throw(MySQLInternalError(conn))
Expand Down
2 changes: 1 addition & 1 deletion src/results.jl
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ end
Get a bind array for binding to results.
"""
function mysql_bind_array(meta::MySQLMetadata)
bindarr = Vector{MYSQL_BIND}(uninitialized, meta.nfields)
bindarr = Vector{MYSQL_BIND}(undef, meta.nfields)
for i in 1:meta.nfields
bufflen = zero(Culong)
bindbuff = C_NULL
Expand Down

0 comments on commit 4d2611e

Please sign in to comment.