From: Dario Faggioli Subject: [PATCH 3/9] xl: turn some int local variable into bool Date: Fri, 06 Mar 2015 18:21:15 +0100 Message-ID: <20150306172115.7269.54250.stgit@Solace.station> References: <20150306170758.7269.53821.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150306170758.7269.53821.stgit@Solace.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Wei Liu , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org more specifically, the ones used as argument presence flags in `xl list'. Signed-off-by: Dario Faggioli Cc: Ian Campbell Cc: Ian Jackson Cc: Stefano Stabellini Cc: Wei Liu --- tools/libxl/xl_cmdimpl.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 5c40e84..69469ff 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -3520,7 +3520,7 @@ static void print_bitmap(uint8_t *map, int maplen, FILE *stream) } } -static void list_domains(int verbose, int context, int claim, int numa, +static void list_domains(bool verbose, bool context, bool claim, bool numa, const libxl_dominfo *info, int nb_domain) { int i; @@ -4504,10 +4504,11 @@ int main_reboot(int argc, char **argv) int main_list(int argc, char **argv) { - int opt, verbose = 0; - int context = 0; - int details = 0; - int numa = 0; + int opt; + bool verbose = false; + bool context = false; + bool details = false; + bool numa = false; static struct option opts[] = { {"long", 0, 0, 'l'}, {"verbose", 0, 0, 'v'}, @@ -4523,16 +4524,16 @@ int main_list(int argc, char **argv) SWITCH_FOREACH_OPT(opt, "lvhZn", opts, "list", 0) { case 'l': - details = 1; + details = true; break; case 'v': - verbose = 1; + verbose = true; break; case 'Z': - context = 1; + context = true; break; case 'n': - numa = 1; + numa = true; break; }