summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2009-12-11 17:35:01 +0000
committerBart De Schuymer <bdschuym@pandora.be>2009-12-11 17:35:01 +0000
commit46123fbda1f9ae482b06f8eccf8db6b65eae6d89 (patch)
treefa74922d68617a2bb5fecbbe0d511de71de89c8d
parent25851643b6c929dfb94238d96ed50135f025589b (diff)
fix return value checking of creat
-rw-r--r--userspace/ebtables2/communication.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/userspace/ebtables2/communication.c b/userspace/ebtables2/communication.c
index 02ea1eb..c45ebec 100644
--- a/userspace/ebtables2/communication.c
+++ b/userspace/ebtables2/communication.c
@@ -189,8 +189,8 @@ static void store_table_in_file(char *filename, struct ebt_replace *repl)
int size;
int fd;
- /* Start from an empty file with right priviliges */
- if (!(fd = creat(filename, 0600))) {
+ /* Start from an empty file with the correct priviliges */
+ if ((fd = creat(filename, 0600)) == -1) {
ebt_print_error("Couldn't create file %s", filename);
return;
}