audience: Always log write_int() fails

Change-Id: I747c38646599ae3f687279ca8a95db804f3ad015
tirimbino
Christopher N. Hesse 8 years ago
parent 705246055a
commit 2036814f43
  1. 6
      audio/audience.c

@ -36,9 +36,6 @@
static int write_int(char const *path, const int value) static int write_int(char const *path, const int value)
{ {
int fd; int fd;
static int already_warned;
already_warned = 0;
ALOGV("write_int: path %s, value %d", path, value); ALOGV("write_int: path %s, value %d", path, value);
fd = open(path, O_RDWR); fd = open(path, O_RDWR);
@ -50,10 +47,7 @@ static int write_int(char const *path, const int value)
close(fd); close(fd);
return amt == -1 ? -errno : 0; return amt == -1 ? -errno : 0;
} else { } else {
if (already_warned == 0) {
ALOGE("write_int failed to open %s\n", path); ALOGE("write_int failed to open %s\n", path);
already_warned = 1;
}
return -errno; return -errno;
} }
} }

Loading…
Cancel
Save