]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
vss: Change vss_playing() and friends to return bool.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 8 Jun 2025 21:12:23 +0000 (23:12 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 12 Jun 2025 23:11:32 +0000 (01:11 +0200)
All users are in boolean contexts.

vss.c
vss.h

diff --git a/vss.c b/vss.c
index 036fb9fe7a50c9502320be5ddc042d1dbeef5e4b..827267d362790c98fea5bb89c776d3c8a57663f3 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -744,7 +744,7 @@ out:
  * \return Greater than zero if playing, zero otherwise.
  *
  */
-unsigned int vss_playing(void)
+bool vss_playing(void)
 {
        return mmd->new_vss_status_flags & VSS_PLAYING;
 }
@@ -755,7 +755,7 @@ unsigned int vss_playing(void)
  * \return Greater than zero if set, zero if not.
  *
  */
-unsigned int vss_next(void)
+bool vss_next(void)
 {
        return mmd->new_vss_status_flags & VSS_NEXT;
 }
@@ -766,7 +766,7 @@ unsigned int vss_next(void)
  * \return Greater than zero if true, zero otherwise.
  *
  */
-unsigned int vss_repos(void)
+bool vss_repos(void)
 {
        return mmd->new_vss_status_flags & VSS_REPOS;
 }
@@ -777,7 +777,7 @@ unsigned int vss_repos(void)
  * \return Greater than zero if paused, zero otherwise.
  *
  */
-unsigned int vss_paused(void)
+bool vss_paused(void)
 {
        return !(mmd->new_vss_status_flags & VSS_NEXT)
                && !(mmd->new_vss_status_flags & VSS_PLAYING);
@@ -789,7 +789,7 @@ unsigned int vss_paused(void)
  * \return Greater than zero if paused, zero otherwise.
  *
  */
-unsigned int vss_stopped(void)
+bool vss_stopped(void)
 {
        return (mmd->new_vss_status_flags & VSS_NEXT)
                && !(mmd->new_vss_status_flags & VSS_PLAYING);
diff --git a/vss.h b/vss.h
index 46bb0e7359bf82acc4736dbb061eda5d7faf24f8..611a294fcf11169042deb0c465207b755d5e0788 100644 (file)
--- a/vss.h
+++ b/vss.h
@@ -3,11 +3,11 @@
 /** \file vss.h Exported functions from vss.c (para_server). */
 
 void vss_init(int afs_socket, struct sched *s);
-unsigned int vss_playing(void);
-unsigned int vss_next(void);
-unsigned int vss_repos(void);
-unsigned int vss_paused(void);
-unsigned int vss_stopped(void);
+bool vss_playing(void);
+bool vss_next(void);
+bool vss_repos(void);
+bool vss_paused(void);
+bool vss_stopped(void);
 struct timeval *vss_chunk_time(void);
 void vss_shutdown(void);