summaryrefslogtreecommitdiff
blob: 795e82ce002fdb6c1277332e119b6176a2e5a893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 3ec9deebd8e3496feacab83e41846dc4fffc3404 Mon Sep 17 00:00:00 2001
From: Phil Miller <unmobile+gh@gmail.com>
Date: Mon, 25 Jun 2018 10:58:59 -0500
Subject: [PATCH] Return 1 to indicate error from main()

The statement 'return false;' was most likely to end up indicating successful exit
by returning a 0 value, when failure seems to be intended.

This was flagged as a warning in the Debian Clang Archive Rebuild.
---
 dump_xsettings.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dump_xsettings.cc b/dump_xsettings.cc
index f94a0c0..e9330b4 100644
--- a/dump_xsettings.cc
+++ b/dump_xsettings.cc
@@ -270,7 +270,7 @@ int main(int argc, char** argv) {
 
   xsettingsd::DataReader reader(buffer, data_size);
   if (!xsettingsd::DumpSettings(&reader))
-    return false;
+    return 1;
 
   return 0;
 }