From: Tollef Fog Heen Date: Sun, 20 Jan 2008 09:09:08 +0000 (+0100) Subject: Style; lose some braces for single-statement if-sentences. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ff7d12ebe8475f2f3e5f9401bd773d48e6118d5;p=dpkg Style; lose some braces for single-statement if-sentences. --- diff --git a/lib/myopt.c b/lib/myopt.c index ac8cf27f..72abb3db 100644 --- a/lib/myopt.c +++ b/lib/myopt.c @@ -223,13 +223,11 @@ void loadfilter(char *fn) { } } - if (ferror(file)) { + if (ferror(file)) ohshite(_("read error in configuration file `%.255s'"), fn); - } - if (fclose(file)) { + if (fclose(file)) ohshite(_("error closing configuration file `%.255s'"), fn); - } } void loadfilters(void) { @@ -237,11 +235,10 @@ void loadfilters(void) { char *dirname = CONFIGDIR "/filters.d"; DIR *dir = opendir(dirname); if (!dir) { - if (errno == ENOENT) { + if (errno == ENOENT) return NULL; - } else { + else ohshite(_("Error opening filters.d")); - } } while ((dent = readdir(dir)) != NULL) {