forked from auracaster/openocd
openocd: manually fix Yoda conditions
Fix the remaining Yoda conditions, detected by checkpatch but not fixed automatically. While there, apply minor style changes. Change-Id: I6e1978b89c4d56a20aceaeb2b52968eb6384432a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6356 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Xiang W <wxjstz@126.com>
This commit is contained in:
@@ -198,7 +198,7 @@ int fileio_read_u32(struct fileio *fileio, uint32_t *data)
|
||||
|
||||
retval = fileio_local_read(fileio, sizeof(uint32_t), buf, &size_read);
|
||||
|
||||
if (ERROR_OK == retval && sizeof(uint32_t) != size_read)
|
||||
if (retval == ERROR_OK && sizeof(uint32_t) != size_read)
|
||||
retval = -EIO;
|
||||
if (retval == ERROR_OK)
|
||||
*data = be_to_h_u32(buf);
|
||||
@@ -252,7 +252,7 @@ int fileio_write_u32(struct fileio *fileio, uint32_t data)
|
||||
|
||||
retval = fileio_write(fileio, 4, buf, &size_written);
|
||||
|
||||
if (ERROR_OK == retval && size_written != sizeof(uint32_t))
|
||||
if (retval == ERROR_OK && size_written != sizeof(uint32_t))
|
||||
retval = -EIO;
|
||||
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user