summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/helloworld.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/helloworld.lua b/apps/plugins/helloworld.lua
index 94e55af3cc..aa2ef446d3 100644
--- a/apps/plugins/helloworld.lua
+++ b/apps/plugins/helloworld.lua
@@ -65,7 +65,7 @@ end
-- Helper function which reads the contents of a file
function file_get_contents(filename)
local file = io.open(filename, "r")
- if(file == nil) then
+ if not file then
return nil
end
@@ -78,11 +78,11 @@ end
-- Helper function which saves contents to a file
function file_put_contents(filename, contents)
local file = io.open(filename, "w+") -- See Lua manual for more information
- if(file == nil) then
+ if not file then
return false
end
- local ret = file:write(contents) == 1
+ local ret = file:write(contents) == true
file:close() -- GC takes care of this if you would've forgotten it
return ret
end