diff options
author | Pierre-Jean Texier | 2019-08-26 13:06:16 +0200 |
---|---|---|
committer | Tom Rini | 2019-09-24 17:46:13 -0400 |
commit | 7ce01c78dcd34b49c779467c33953c931bf7bf06 (patch) | |
tree | dbea214b97aa561841bb6f32fddda15a0b8d1b0b /tools/env/fw_env.c | |
parent | e184a3b4fd5809a03fa8a821137103bcbbda4cd0 (diff) |
fw_env: fix build error
The following error appears:
tools/env/fw_env.c:1149:25: error: lvalue required as unary ‘&’ operand
rc = write(fd, &ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));
Fixes: d3716dd ("env: Rename the redundancy flags")
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Joris Offouga <offougajoris@gmail.com>
Tested-by: Heiko Schocher <hs@denx.de>
Suggested-by: Heiko Schocher <hs@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'tools/env/fw_env.c')
-rw-r--r-- | tools/env/fw_env.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index 876bf2b2daa..e2801f595f6 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -1135,6 +1135,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t offset) { int rc; struct erase_info_user erase; + char tmp = ENV_REDUND_OBSOLETE; erase.start = DEVOFFSET(dev); erase.length = DEVESIZE(dev); @@ -1146,7 +1147,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t offset) return rc; } ioctl(fd, MEMUNLOCK, &erase); - rc = write(fd, &ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE)); + rc = write(fd, &tmp, sizeof(tmp)); ioctl(fd, MEMLOCK, &erase); if (rc < 0) perror("Could not set obsolete flag"); |