All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Mike Isely <isely@pobox.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 6/6] [media] pvrusb2: replace !0 with 1
Date: Sat, 26 Mar 2011 01:55:30 +0000	[thread overview]
Message-ID: <20110326015530.GK2008@bicker> (raw)

Using !0 is less readable than just saying 1.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c
index 9bebc08..ca4f67b 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-std.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-std.c
@@ -158,7 +158,7 @@ int pvr2_std_str_to_id(v4l2_std_id *idPtr, const char *buf,
 			cnt++;
 			buf += cnt;
 			buf_size -= cnt;
-			mMode = !0;
+			mMode = 1;
 			cmsk = sp->id;
 			continue;
 		}
@@ -190,7 +190,7 @@ int pvr2_std_str_to_id(v4l2_std_id *idPtr, const char *buf,
 
 	if (idPtr)
 		*idPtr = id;
-	return !0;
+	return 1;
 }
 
 unsigned int pvr2_std_id_to_str(char *buf, unsigned int buf_size,
@@ -217,10 +217,10 @@ unsigned int pvr2_std_id_to_str(char *buf, unsigned int buf_size,
 					buf_size -= c2;
 					buf += c2;
 				}
-				cfl = !0;
+				cfl = 1;
 				c2 = scnprintf(buf, buf_size,
 					       "%s-", gp->name);
-				gfl = !0;
+				gfl = 1;
 			} else {
 				c2 = scnprintf(buf, buf_size, "/");
 			}
@@ -315,7 +315,7 @@ static int pvr2_std_fill(struct v4l2_standard *std, v4l2_std_id id)
 	std->name[bcnt] = 0;
 	pvr2_trace(PVR2_TRACE_STD, "Set up standard idx=%u name=%s",
 		   std->index, std->name);
-	return !0;
+	return 1;
 }
 
 /*

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Mike Isely <isely@pobox.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 6/6] [media] pvrusb2: replace !0 with 1
Date: Sat, 26 Mar 2011 04:55:30 +0300	[thread overview]
Message-ID: <20110326015530.GK2008@bicker> (raw)

Using !0 is less readable than just saying 1.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c
index 9bebc08..ca4f67b 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-std.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-std.c
@@ -158,7 +158,7 @@ int pvr2_std_str_to_id(v4l2_std_id *idPtr, const char *buf,
 			cnt++;
 			buf += cnt;
 			buf_size -= cnt;
-			mMode = !0;
+			mMode = 1;
 			cmsk = sp->id;
 			continue;
 		}
@@ -190,7 +190,7 @@ int pvr2_std_str_to_id(v4l2_std_id *idPtr, const char *buf,
 
 	if (idPtr)
 		*idPtr = id;
-	return !0;
+	return 1;
 }
 
 unsigned int pvr2_std_id_to_str(char *buf, unsigned int buf_size,
@@ -217,10 +217,10 @@ unsigned int pvr2_std_id_to_str(char *buf, unsigned int buf_size,
 					buf_size -= c2;
 					buf += c2;
 				}
-				cfl = !0;
+				cfl = 1;
 				c2 = scnprintf(buf, buf_size,
 					       "%s-", gp->name);
-				gfl = !0;
+				gfl = 1;
 			} else {
 				c2 = scnprintf(buf, buf_size, "/");
 			}
@@ -315,7 +315,7 @@ static int pvr2_std_fill(struct v4l2_standard *std, v4l2_std_id id)
 	std->name[bcnt] = 0;
 	pvr2_trace(PVR2_TRACE_STD, "Set up standard idx=%u name=%s",
 		   std->index, std->name);
-	return !0;
+	return 1;
 }
 
 /*

             reply	other threads:[~2011-03-26  1:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26  1:55 Dan Carpenter [this message]
2011-03-26  1:55 ` [PATCH 6/6] [media] pvrusb2: replace !0 with 1 Dan Carpenter
2011-03-26  4:37 ` Mike Isely
2011-03-26  4:37   ` Mike Isely
2011-03-28 20:24   ` Jarod Wilson
2011-03-28 20:24     ` Jarod Wilson

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=20110326015530.GK2008@bicker \
    --to=error27@gmail.com \
    --cc=isely@pobox.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.