darwin: fix `if ()` warning

pull/4739/head
Don Alfons Nisnoni 2020-05-06 02:07:43 +08:00 committed by GitHub
parent 473ffb5489
commit 8fbbf488ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ pub fn resource_path() string {
mut buffer := malloc(buffer_size) mut buffer := malloc(buffer_size)
buffer[0] = 0 buffer[0] = 0
conv_result := C.CFURLGetFileSystemRepresentation(resource_dir_url, true, buffer, buffer_size) conv_result := C.CFURLGetFileSystemRepresentation(resource_dir_url, true, buffer, buffer_size)
if(conv_result == 0) { if conv_result == 0 {
panic('CFURLGetFileSystemRepresentation failed') panic('CFURLGetFileSystemRepresentation failed')
} }
result := string(buffer) result := string(buffer)