Cleanup indentation with clang-format and changed a few variable names

This commit is contained in:
o9000
2015-11-20 23:28:37 +01:00
parent c0e62e2e79
commit 4a6937826c
51 changed files with 4145 additions and 3789 deletions

View File

@@ -29,7 +29,8 @@
int apm_fd = -1;
gboolean battery_os_init() {
gboolean battery_os_init()
{
if (apm_fd > 0)
close(apm_fd);
@@ -43,13 +44,15 @@ gboolean battery_os_init() {
}
}
void battery_os_free() {
void battery_os_free()
{
if ((apm_fd != -1) && (close(apm_fd) == -1))
warn("cannot close /dev/apm");
apm_fd = -1;
}
int battery_os_update(struct batstate *state) {
int battery_os_update(struct batstate *state)
{
struct apm_power_info info;
if (apm_fd > 0 && ioctl(apm_fd, APM_IOC_GETPOWER, &(info)) == 0) {
@@ -81,7 +84,8 @@ int battery_os_update(struct batstate *state) {
return 0;
}
char* battery_os_tooltip() {
char *battery_os_tooltip()
{
GString *tooltip = g_string_new("");
gchar *result;