From b55488469aa8741ce06ca13a440e2ffde22c8487 Mon Sep 17 00:00:00 2001
From: Niels Thykier <niels@thykier.net>
Date: Sun, 3 May 2020 17:06:21 +0000
Subject: [PATCH 3/5] Fix style related remarks

Signed-off-by: Niels Thykier <niels@thykier.net>
---
 dpkg-deb/build.c | 13 +++++++------
 src/configure.c  |  2 +-
 src/unpack.c     |  4 ++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index d4031d784e..323256cacf 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -291,10 +291,10 @@ check_conffiles(const char *ctrldir, const char *rootdir)
         remove_on_upgrade = true;
       } else {
         if ((flag_len > 1) && c_isspace(flags_pos[flag_len - 2]))
-            warning(_("Line with conffile filename '%s' contains trailing "
+            warning(_("line with conffile filename '%s' contains trailing "
                       "white spaces"), conffilename);
         if ((flag_len > 1) && c_isspace(flags_pos[0]))
-            warning(_("Line with conffile filename '%s' contains leading "
+            warning(_("line with conffile filename '%s' contains leading "
                       "white spaces before conffile flag"), conffilename);
         ohshit(_("Unknown flag '%s' for conffile '%s'"), flags_pos,
                conffilename);
@@ -304,13 +304,14 @@ check_conffiles(const char *ctrldir, const char *rootdir)
     varbuf_reset(&controlfile);
     varbuf_printf(&controlfile, "%s/%s", rootdir, conffilename);
     if (lstat(controlfile.buf, &controlstab)) {
-      if (errno == ENOENT && !remove_on_upgrade) {
+      if (errno == ENOENT) {
         if ((n > 1) && c_isspace(conffilename[n - 2]))
           warning(_("conffile filename '%s' contains trailing white spaces"),
                   conffilename);
-        ohshit(_("conffile '%.250s' does not appear in package"), conffilename);
-      } else if (!remove_on_upgrade)
-        ohshite(_("conffile '%.250s' is not stattable"), conffilename);
+        if (!remove_on_upgrade)
+          ohshit(_("conffile '%.250s' does not appear in package"),
+                 conffilename);
+      }
     } else if (remove_on_upgrade) {
         ohshite(_("conffile '%.250s' is present but is requested to be"
                   " removed"), conffilename);
diff --git a/src/configure.c b/src/configure.c
index aed5739a82..674d8c4458 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -416,7 +416,7 @@ deferred_configure_conffile(struct pkginfo *pkg, struct conffile *conff)
 			/* rename */
 			strcpy(cdr2rest, DPKGOLDEXT);
 
-			printf(_("Obsolete conffile '%.250s' has been modified"
+			printf(_("Obsolete conffile '%.250s' has been modified "
 			         "by you.\n"), cdr.buf);
 			printf(_("Saving as %.250s ...\n"), cdr2.buf);
 			if (rename(cdr.buf, cdr2.buf))
diff --git a/src/unpack.c b/src/unpack.c
index 416d9d1bff..953296abf6 100644
--- a/src/unpack.c
+++ b/src/unpack.c
@@ -368,7 +368,7 @@ deb_parse_conffiles(struct pkginfo *pkg, const char *control_conffiles,
       /* rtrim_space will insert a NUL byte and split the string for us */
       p = rtrim_space(flags_pos, conffilenamebuf);
       if (p == conffilenamebuf) {
-        ohshit(_("No conffile name before flags in line '%.250s'"),
+        ohshit(_("no conffile name before flags in line '%.250s'"),
                conffilenamebuf);
       }
       do {
@@ -379,7 +379,7 @@ deb_parse_conffiles(struct pkginfo *pkg, const char *control_conffiles,
         confflags |= FNNF_RM_CONFF_ON_UPGRADE;
         confflags &= ~FNNF_NEW_CONFF;
       } else {
-        ohshit(_("Unknown conffile flag '%.250s' for conffile '%.250s'"),
+        ohshit(_("unknown conffile flag '%.250s' for conffile '%.250s'"),
                flags_pos, conffilenamebuf);
       }
     }
-- 
2.26.2

