fix cppcheck

This commit is contained in:
tkl
2016-07-23 11:27:35 +02:00
parent 161abd76cf
commit 77102723f8
4 changed files with 2 additions and 17 deletions

View File

@@ -103,11 +103,10 @@ int cc110x_write(const struct cc110x *cc110x, const char *buffer,
int cc110x_read(const struct cc110x *cc110x, char *buffer, int size)
{
int ret;
unsigned int irq;
if((NULL == cc110x) || (NULL == buffer))
return (-1);
if(0 == cc110x_get_rx_count(cc110x)) {
irq = disable_irq();
unsigned int irq = disable_irq();
current_thread->status = THREAD_STATUS_BLOCKING;
current_thread->wakeup_blocking_source = (void*) cc110x;
restore_irq(irq);

View File

@@ -101,7 +101,7 @@ int ssd1306_open(const struct ssd1306 *dev)
{
int ret;
ret = i2c_open((struct i2c *)dev->dev);
ret = i2c_write(dev->dev, dev->i2c_addr, init_sequence,
ret |= i2c_write(dev->dev, dev->i2c_addr, init_sequence,
sizeof(init_sequence) / sizeof(init_sequence[0]));
ret |= clear(dev);
ret |= set_column(dev, 0);