mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>, Fabian Frederick <fabf@skynet.be>
Subject: [PATCH 6/8] cdrom: use bool for true/false initialized variable
Date: Fri, 31 Oct 2014 22:48:02 +0100	[thread overview]
Message-ID: <1414792084-7739-7-git-send-email-fabf@skynet.be> (raw)
In-Reply-To: <1414792084-7739-1-git-send-email-fabf@skynet.be>

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/cdrom/cdrom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index a4dd382..a1a26d5 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3678,9 +3678,9 @@ static struct ctl_table_header *cdrom_sysctl_header;
 
 static void cdrom_sysctl_register(void)
 {
-	static int initialized;
+	static bool initialized;
 
-	if (initialized == 1)
+	if (initialized)
 		return;
 
 	cdrom_sysctl_header = register_sysctl_table(cdrom_root_table);
@@ -3692,7 +3692,7 @@ static void cdrom_sysctl_register(void)
 	cdrom_sysctl_settings.lock = lockdoor;
 	cdrom_sysctl_settings.check = check_media_type;
 
-	initialized = 1;
+	initialized = true;
 }
 
 static void cdrom_sysctl_unregister(void)
-- 
1.9.3


  parent reply	other threads:[~2014-10-31 21:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 21:47 [PATCH 0/8] cdrom: sysctl export + clean-up Fabian Frederick
2014-10-31 21:47 ` [PATCH 1/8] cdrom: include linux/uaccess.h instead of asm/uaccess.h Fabian Frederick
2014-10-31 21:47 ` [PATCH 2/8] cdrom: use static const char * const where possible Fabian Frederick
2014-10-31 21:47 ` [PATCH 3/8] cdrom: fix spaces required errors Fabian Frederick
2014-10-31 21:48 ` [PATCH 4/8] cdrom: move EXPORT_SYMBOL after functions Fabian Frederick
2014-10-31 21:48 ` [PATCH 5/8] cdrom: remove bool comparison/assignment to 0/1 Fabian Frederick
2014-10-31 21:48 ` Fabian Frederick [this message]
2014-10-31 21:48 ` [PATCH 7/8] cdrom: cdrom: export sysctl code Fabian Frederick
2014-10-31 22:12   ` Joe Perches
2014-10-31 21:48 ` [PATCH 8/8] cdrom: fix init_cdrom_command in dvd_do_auth Fabian Frederick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414792084-7739-7-git-send-email-fabf@skynet.be \
    --to=fabf@skynet.be \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®