aboutsummaryrefslogtreecommitdiff
path: root/core/image
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-08-04 15:01:04 +0100
committergingerBill <bill@gingerbill.org>2024-08-04 15:01:04 +0100
commitacb1ebddf68d4611f666aa3c85ec1c28f40fafbe (patch)
tree193ae6b66dbf777799c279c1d3455325933f44aa /core/image
parent0bedd3357ae709c1d35e86ce6e883964fea13fdd (diff)
Fix `err != 0` uses
Diffstat (limited to 'core/image')
-rw-r--r--core/image/png/example.odin2
-rw-r--r--core/image/png/helpers.odin2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/image/png/example.odin b/core/image/png/example.odin
index cd9788bd3..ce491978b 100644
--- a/core/image/png/example.odin
+++ b/core/image/png/example.odin
@@ -213,7 +213,7 @@ write_image_as_ppm :: proc(filename: string, image: ^image.Image) -> (success: b
}
fd, err := open(filename, flags, mode)
- if err != 0 {
+ if err != nil {
return false
}
defer close(fd)
diff --git a/core/image/png/helpers.odin b/core/image/png/helpers.odin
index ac61378da..7b6367694 100644
--- a/core/image/png/helpers.odin
+++ b/core/image/png/helpers.odin
@@ -450,7 +450,7 @@ when false {
}
fd, fderr := open(filename, flags, mode)
- if fderr != 0 {
+ if fderr != nil {
return .Cannot_Open_File
}
defer close(fd)