More clean ups of ERROR_NONE and != nil usage
This commit is contained in:
1 parent
a241168142
commit
28666414bc
15 files changed
+224
-297
No files matched your search
+3
-3
@@ -145,13 +145,13 @@ read_entire_file_from_handle :: proc(fd: Handle, allocator := context.allocator,
|
||||
return nil, true
|
||||
}
|
||||
|
||||
data = make([]byte, int(length), allocator, loc)
|
||||
if data == nil {
|
||||
data, err = make([]byte, int(length), allocator, loc)
|
||||
if data == nil || err != nil {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
bytes_read, read_err := read_full(fd, data)
|
||||
if read_err != ERROR_NONE {
|
||||
if read_err != nil {
|
||||
delete(data)
|
||||
return nil, false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user