Avoid non-standard conditionals with omitted operands.
Fixes bug #257. Change-Id: I05fc6468306d46399e769098e031e7e588798afc Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: http://openocd.zylin.com/6271 Tested-by: jenkins Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
@@ -139,9 +139,9 @@ static int lpc3180_init(struct nand_device *nand)
|
||||
{
|
||||
struct lpc3180_nand_controller *lpc3180_info = nand->controller_priv;
|
||||
struct target *target = nand->target;
|
||||
int bus_width = nand->bus_width ? : 8;
|
||||
int address_cycles = nand->address_cycles ? : 3;
|
||||
int page_size = nand->page_size ? : 512;
|
||||
int bus_width = nand->bus_width ? nand->bus_width : 8;
|
||||
int address_cycles = nand->address_cycles ? nand->address_cycles : 3;
|
||||
int page_size = nand->page_size ? nand->page_size : 512;
|
||||
|
||||
if (target->state != TARGET_HALTED) {
|
||||
LOG_ERROR("target must be halted to use LPC3180 NAND flash controller");
|
||||
|
||||
@@ -191,9 +191,9 @@ static int lpc32xx_init(struct nand_device *nand)
|
||||
{
|
||||
struct lpc32xx_nand_controller *lpc32xx_info = nand->controller_priv;
|
||||
struct target *target = nand->target;
|
||||
int bus_width = nand->bus_width ? : 8;
|
||||
int address_cycles = nand->address_cycles ? : 3;
|
||||
int page_size = nand->page_size ? : 512;
|
||||
int bus_width = nand->bus_width ? nand->bus_width : 8;
|
||||
int address_cycles = nand->address_cycles ? nand->address_cycles : 3;
|
||||
int page_size = nand->page_size ? nand->page_size : 512;
|
||||
int retval;
|
||||
|
||||
if (target->state != TARGET_HALTED) {
|
||||
|
||||
@@ -183,7 +183,7 @@ static int nuc910_nand_init(struct nand_device *nand)
|
||||
{
|
||||
struct nuc910_nand_controller *nuc910_nand = nand->controller_priv;
|
||||
struct target *target = nand->target;
|
||||
int bus_width = nand->bus_width ? : 8;
|
||||
int bus_width = nand->bus_width ? nand->bus_width : 8;
|
||||
int result;
|
||||
|
||||
result = validate_target_state(nand);
|
||||
|
||||
Reference in New Issue
Block a user