From 7f2cb5708439cee0f52a693c02131dc4dc08fd02 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 26 Jan 2014 12:07:10 +0100 Subject: explicit braces to avoid ambiguous ‘else’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- dist/archlinux/stable/PKGBUILD | 4 ++-- src/adjbacklight.c | 26 ++++++++++++++------------ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/dist/archlinux/stable/PKGBUILD b/dist/archlinux/stable/PKGBUILD index b02bec1..b830976 100644 --- a/dist/archlinux/stable/PKGBUILD +++ b/dist/archlinux/stable/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org> pkgname=adjbacklight -pkgver=7 +pkgver=7.1 pkgrel=1 pkgdesc="Convient method for adjusting the backlight on your portable computer" arch=('x86_64' 'i686') @@ -10,7 +10,7 @@ license=('GPL3') depends=('linux') makedepends=('gcc' 'make' 'coreutils') source=(https://github.com/maandree/adjbacklight/archive/${pkgver}.tar.gz) -sha256sums=(07b16afed6e7ce9228b9c6e607f0fe5bdaf232dd121b0f977387a32497326180) +sha256sums=(0f38af21aa36f6de1eb6fab91c4b8da6279fdd25e381149a1856cc06fd39ffc4) build() { diff --git a/src/adjbacklight.c b/src/adjbacklight.c index 53f3013..3baf0a1 100644 --- a/src/adjbacklight.c +++ b/src/adjbacklight.c @@ -497,18 +497,20 @@ int main(int argc, char** argv) free(space); } else if (get) - if (nbrightness) - { - brightness *= 100.f; - brightness /= nbrightness; - printf("%.2f%%\n", brightness); - fflush(stdout); - } - else - { - printf("%s\n", "100.00%"); - fflush(stdout); - } + { + if (nbrightness) + { + brightness *= 100.f; + brightness /= nbrightness; + printf("%.2f%%\n", brightness); + fflush(stdout); + } + else + { + printf("%s\n", "100.00%"); + fflush(stdout); + } + } } -- cgit v1.2.3-70-g09d2