Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
20feb0cb
Commit
20feb0cb
authored
Sep 07, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: showPlaylist() and shufflePlaylist() cannot fail
Make them both return void.
parent
e1bf9667
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
command.c
src/command.c
+4
-2
playlist.c
src/playlist.c
+2
-6
playlist.h
src/playlist.h
+2
-2
No files found.
src/command.c
View file @
20feb0cb
...
@@ -437,13 +437,15 @@ static int handleDeleteId(int fd, mpd_unused int *permission,
...
@@ -437,13 +437,15 @@ static int handleDeleteId(int fd, mpd_unused int *permission,
static
int
handlePlaylist
(
int
fd
,
mpd_unused
int
*
permission
,
static
int
handlePlaylist
(
int
fd
,
mpd_unused
int
*
permission
,
mpd_unused
int
argc
,
mpd_unused
char
*
argv
[])
mpd_unused
int
argc
,
mpd_unused
char
*
argv
[])
{
{
return
showPlaylist
(
fd
);
showPlaylist
(
fd
);
return
0
;
}
}
static
int
handleShuffle
(
int
fd
,
mpd_unused
int
*
permission
,
static
int
handleShuffle
(
int
fd
,
mpd_unused
int
*
permission
,
mpd_unused
int
argc
,
mpd_unused
char
*
argv
[])
mpd_unused
int
argc
,
mpd_unused
char
*
argv
[])
{
{
return
shufflePlaylist
(
fd
);
shufflePlaylist
(
fd
);
return
0
;
}
}
static
int
handleClear
(
mpd_unused
int
fd
,
mpd_unused
int
*
permission
,
static
int
handleClear
(
mpd_unused
int
fd
,
mpd_unused
int
*
permission
,
...
...
src/playlist.c
View file @
20feb0cb
...
@@ -217,7 +217,7 @@ int clearStoredPlaylist(int fd, const char *utf8file)
...
@@ -217,7 +217,7 @@ int clearStoredPlaylist(int fd, const char *utf8file)
return
removeAllFromStoredPlaylistByPath
(
fd
,
utf8file
);
return
removeAllFromStoredPlaylistByPath
(
fd
,
utf8file
);
}
}
int
showPlaylist
(
int
fd
)
void
showPlaylist
(
int
fd
)
{
{
int
i
;
int
i
;
char
path_max_tmp
[
MPD_PATH_MAX
];
char
path_max_tmp
[
MPD_PATH_MAX
];
...
@@ -226,8 +226,6 @@ int showPlaylist(int fd)
...
@@ -226,8 +226,6 @@ int showPlaylist(int fd)
fdprintf
(
fd
,
"%i:%s
\n
"
,
i
,
fdprintf
(
fd
,
"%i:%s
\n
"
,
i
,
get_song_url
(
path_max_tmp
,
playlist
.
songs
[
i
]));
get_song_url
(
path_max_tmp
,
playlist
.
songs
[
i
]));
}
}
return
0
;
}
}
void
savePlaylistState
(
FILE
*
fp
)
void
savePlaylistState
(
FILE
*
fp
)
...
@@ -1224,7 +1222,7 @@ void previousSongInPlaylist(void)
...
@@ -1224,7 +1222,7 @@ void previousSongInPlaylist(void)
}
}
}
}
int
shufflePlaylist
(
mpd_unused
int
fd
)
void
shufflePlaylist
(
mpd_unused
int
fd
)
{
{
int
i
;
int
i
;
int
ri
;
int
ri
;
...
@@ -1253,8 +1251,6 @@ int shufflePlaylist(mpd_unused int fd)
...
@@ -1253,8 +1251,6 @@ int shufflePlaylist(mpd_unused int fd)
incrPlaylistVersion
();
incrPlaylistVersion
();
}
}
return
0
;
}
}
int
deletePlaylist
(
int
fd
,
const
char
*
utf8file
)
int
deletePlaylist
(
int
fd
,
const
char
*
utf8file
)
...
...
src/playlist.h
View file @
20feb0cb
...
@@ -61,7 +61,7 @@ int addToStoredPlaylist(int fd, const char *file, const char *utf8file);
...
@@ -61,7 +61,7 @@ int addToStoredPlaylist(int fd, const char *file, const char *utf8file);
int
addSongToPlaylist
(
int
fd
,
Song
*
song
,
int
*
added_id
);
int
addSongToPlaylist
(
int
fd
,
Song
*
song
,
int
*
added_id
);
int
showPlaylist
(
int
fd
);
void
showPlaylist
(
int
fd
);
int
deleteFromPlaylist
(
int
fd
,
int
song
);
int
deleteFromPlaylist
(
int
fd
,
int
song
);
...
@@ -83,7 +83,7 @@ void syncPlayerAndPlaylist(void);
...
@@ -83,7 +83,7 @@ void syncPlayerAndPlaylist(void);
void
previousSongInPlaylist
(
void
);
void
previousSongInPlaylist
(
void
);
int
shufflePlaylist
(
int
fd
);
void
shufflePlaylist
(
int
fd
);
int
savePlaylist
(
int
fd
,
const
char
*
utf8file
);
int
savePlaylist
(
int
fd
,
const
char
*
utf8file
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment