Errors are propagated in the loop and ret is never set. Remove it.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 scripts/bareboximd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/scripts/bareboximd.c b/scripts/bareboximd.c
index b733cae61c87..d11b661fa391 100644
--- a/scripts/bareboximd.c
+++ b/scripts/bareboximd.c
@@ -53,7 +53,7 @@ int imd_command_setenv(const char *variable_name, const char 
*value)
 
 static int write_file(const char *filename, const void *buf, size_t size)
 {
-       int fd, ret;
+       int fd;
        int now;
 
        fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR | 
S_IRGRP | S_IROTH);
@@ -74,9 +74,6 @@ static int write_file(const char *filename, const void *buf, 
size_t size)
 
        close(fd);
 
-       if (ret < 0)
-               return ret;
-
        return 0;
 }
 
-- 
2.26.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to