Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1229403

[PATCH 4/4] sound/core/seq: make prioq_match return bool

From Yaowei Bai <bywxiaobai@163.com>
Newsgroups linux.kernel
Subject [PATCH 4/4] sound/core/seq: make prioq_match return bool
Date 2015-09-21 16:10 +0200
Message-ID <qb9X5-rF-57@gated-at.bofh.it> (permalink)
References <qb9X4-rF-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch makes prioq_match return bool due to this particular
function only using either one or zero as its return value.

No functional change.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 sound/core/seq/seq_prioq.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c
index bc1c848..aebae09 100644
--- a/sound/core/seq/seq_prioq.c
+++ b/sound/core/seq/seq_prioq.c
@@ -264,26 +264,26 @@ struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq * f)
 }
 
 
-static inline int prioq_match(struct snd_seq_event_cell *cell,
+static inline bool prioq_match(struct snd_seq_event_cell *cell,
 			      int client, int timestamp)
 {
 	if (cell->event.source.client == client ||
 	    cell->event.dest.client == client)
-		return 1;
+		return true;
 	if (!timestamp)
-		return 0;
+		return false;
 	switch (cell->event.flags & SNDRV_SEQ_TIME_STAMP_MASK) {
 	case SNDRV_SEQ_TIME_STAMP_TICK:
 		if (cell->event.time.tick)
-			return 1;
+			return true;
 		break;
 	case SNDRV_SEQ_TIME_STAMP_REAL:
 		if (cell->event.time.time.tv_sec ||
 		    cell->event.time.time.tv_nsec)
-			return 1;
+			return true;
 		break;
 	}
-	return 0;
+	return false;
 }
 
 /* remove cells for left client */
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] sound/onyx: remove redundant case entry Yaowei Bai <bywxiaobai@163.com> - 2015-09-21 16:10 +0200
  [PATCH 4/4] sound/core/seq: make prioq_match return bool Yaowei Bai <bywxiaobai@163.com> - 2015-09-21 16:10 +0200
    Re: [PATCH 4/4] sound/core/seq: make prioq_match return bool Johannes Berg <johannes@sipsolutions.net> - 2015-09-21 16:20 +0200
  [PATCH 2/4] sound/i2sbus/core: make format more appropriate Yaowei Bai <bywxiaobai@163.com> - 2015-09-21 16:20 +0200

csiph-web