Skip to content

Commit

Permalink
net.ftp: use unsafe { nil }
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Jan 13, 2025
1 parent 78f34e6 commit 6f7cbd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/net/ftp/ftp.v
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mut:
// new returns an `FTP` instance.
pub fn new() FTP {
mut f := FTP{
conn: 0
conn: unsafe { nil }
}
f.buffer_size = 1024
return f
Expand Down Expand Up @@ -184,7 +184,7 @@ fn new_dtp(msg string) !&DTP {
mut dtp := &DTP{
ip: ip
port: port
conn: 0
conn: unsafe { nil }
}
conn := net.dial_tcp('${ip}:${port}') or { return error('Cannot connect to the data channel') }
dtp.conn = conn
Expand Down

0 comments on commit 6f7cbd1

Please sign in to comment.