summaryrefslogtreecommitdiffstats
path: root/commands/saveenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/saveenv.c')
-rw-r--r--commands/saveenv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/saveenv.c b/commands/saveenv.c
index a4b279676d..549fcd4279 100644
--- a/commands/saveenv.c
+++ b/commands/saveenv.c
@@ -54,7 +54,7 @@ static int do_saveenv(int argc, char *argv[])
ret = protect(fd, ~0, 0, 0);
/* ENOSYS is no error here, many devices do not need it */
- if (ret && errno != -ENOSYS) {
+ if (ret && errno != ENOSYS) {
printf("could not unprotect %s: %s\n", filename, errno_str());
close(fd);
return 1;
@@ -63,7 +63,7 @@ static int do_saveenv(int argc, char *argv[])
ret = erase(fd, ~0, 0);
/* ENOSYS is no error here, many devices do not need it */
- if (ret && errno != -ENOSYS) {
+ if (ret && errno != ENOSYS) {
printf("could not erase %s: %s\n", filename, errno_str());
close(fd);
return 1;
@@ -82,7 +82,7 @@ static int do_saveenv(int argc, char *argv[])
ret = protect(fd, ~0, 0, 1);
/* ENOSYS is no error here, many devices do not need it */
- if (ret && errno != -ENOSYS) {
+ if (ret && errno != ENOSYS) {
printf("could not protect %s: %s\n", filename, errno_str());
close(fd);
return 1;