From: Andre Noll Date: Sun, 8 Jun 2025 21:12:23 +0000 (+0200) Subject: vss: Change vss_playing() and friends to return bool. X-Git-Url: https://git.tuebingen.mpg.de/?a=commitdiff_plain;h=bed9a41ea70b826f9d71c01da957237cbf57b0e8;p=paraslash.git vss: Change vss_playing() and friends to return bool. All users are in boolean contexts. --- diff --git a/vss.c b/vss.c index 036fb9fe..827267d3 100644 --- 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 46bb0e73..611a294f 100644 --- 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);