0
0
mirror of https://gitlab.com/cznic/sqlite.git synced 2025-06-11 23:41:48 +00:00

vfs: simplify vfsFullPathname

This commit is contained in:
Jan Mercl
2022-07-23 13:01:32 +02:00
parent d799b931d5
commit e3fddbcfd8

@ -75,11 +75,7 @@ func init() {
}
func vfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 {
out := libc.GoString(zPath)
for i := 0; i < len(out) && i < int(nPathOut); i++ {
*(*byte)(unsafe.Pointer(zPathOut)) = out[i]
zPathOut++
}
libc.Xstrncpy(tls, zPathOut, zPath, uint64(nPathOut))
return sqlite3.SQLITE_OK
}