Skip to content

Commit

Permalink
FIXUP: remove trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
LudwigKnuepfer committed Oct 3, 2014
1 parent 9610f7c commit 4865094
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cpu/native/gpio/sysfs/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @ingroup native_cpu
* @{
* @file
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
*/

#include <stdio.h>
Expand Down Expand Up @@ -196,15 +196,15 @@ static int sysfs_gpio_conf(gpio_t dev, _native_gpio_conf_t conf)
warnx("sysfs_gpio_conf(%i): snprintf: fail", dev);
return -1;
}

_native_syscall_enter();
int fd = real_open(gpio_path_name, O_WRONLY);
if (fd < 0) {
warn("sysfs_gpio_conf(%i)", dev);
_native_syscall_leave();
return -1;
}

int ret = 0;
switch (conf) {
case (_NATIVE_GPIO_CONF_IN):
Expand Down Expand Up @@ -244,15 +244,15 @@ static int sysfs_gpio_read(gpio_t dev)
warnx("sysfs_gpio_read(%i): snprintf: fail", dev);
return -1;
}

_native_syscall_enter();
int fd = real_open(gpio_path_name, O_RDONLY);
if (fd < 0) {
warn("sysfs_gpio_read(%i)", dev);
_native_syscall_leave();
return -1;
}

char val;
int ret = real_read(fd, &val, 1);
if (ret == -1) {
Expand All @@ -271,7 +271,7 @@ static int sysfs_gpio_read(gpio_t dev)
ret = -1;
}
}

if (real_close(fd) == -1) {
warn("sysfs_gpio_read");
}
Expand Down

0 comments on commit 4865094

Please sign in to comment.