From 5aca21a502839e2cfd30f0cfb186badc302a7eb5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Aug 2006 04:18:41 +0000 Subject: Several fixes uncovered with -pedantic playerData.c: proper error checking directory.c: properly check myFgets() for errors (it returns NULL on error) inputPlugins/mp3_plugin.c get rid of commas at the end of enums interface.c: we weren't using long long, so strtoll isn't needed get rid of void-pointer arithmetic sllist.c: get rid of void-pointer arithmetic compress.c: get rid of C++ comments, some compilers don't accept them Note that I personally like void pointer arithmetic, but some ancient compilers don't support them :( git-svn-id: https://svn.musicpd.org/mpd/trunk@4510 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/playerData.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/playerData.c') diff --git a/src/playerData.c b/src/playerData.c index 2c18b6937..a023d76e9 100644 --- a/src/playerData.c +++ b/src/playerData.c @@ -96,7 +96,7 @@ void initPlayerData(void) ERROR("problems shmget'ing\n"); exit(EXIT_FAILURE); } - if ((playerData_pd = shmat(shmid, NULL, 0)) < 0) { + if (!(playerData_pd = shmat(shmid, NULL, 0))) { ERROR("problems shmat'ing\n"); exit(EXIT_FAILURE); } @@ -112,7 +112,7 @@ void initPlayerData(void) ERROR("problems shmget'ing\n"); exit(EXIT_FAILURE); } - if ((player_pid = shmat(shmid, NULL, 0)) < 0) { + if (!(player_pid = shmat(shmid, NULL, 0))) { ERROR("problems shmat'ing\n"); exit(EXIT_FAILURE); } -- cgit v1.2.3