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
993df0fd
Commit
993df0fd
authored
Aug 11, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command/{Queue,Other}: eliminate local "bool" variable
parent
4294fdb0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
13 deletions
+6
-13
OtherCommands.cxx
src/command/OtherCommands.cxx
+1
-4
QueueCommands.cxx
src/command/QueueCommands.cxx
+1
-3
StickerCommands.cxx
src/command/StickerCommands.cxx
+4
-6
No files found.
src/command/OtherCommands.cxx
View file @
993df0fd
...
@@ -308,8 +308,6 @@ CommandResult
...
@@ -308,8 +308,6 @@ CommandResult
handle_setvol
(
Client
&
client
,
ConstBuffer
<
const
char
*>
args
)
handle_setvol
(
Client
&
client
,
ConstBuffer
<
const
char
*>
args
)
{
{
unsigned
level
;
unsigned
level
;
bool
success
;
if
(
!
check_unsigned
(
client
,
&
level
,
args
.
front
()))
if
(
!
check_unsigned
(
client
,
&
level
,
args
.
front
()))
return
CommandResult
::
ERROR
;
return
CommandResult
::
ERROR
;
...
@@ -318,8 +316,7 @@ handle_setvol(Client &client, ConstBuffer<const char *> args)
...
@@ -318,8 +316,7 @@ handle_setvol(Client &client, ConstBuffer<const char *> args)
return
CommandResult
::
ERROR
;
return
CommandResult
::
ERROR
;
}
}
success
=
volume_level_change
(
client
.
partition
.
outputs
,
level
);
if
(
!
volume_level_change
(
client
.
partition
.
outputs
,
level
))
{
if
(
!
success
)
{
command_error
(
client
,
ACK_ERROR_SYSTEM
,
command_error
(
client
,
ACK_ERROR_SYSTEM
,
"problems setting volume"
);
"problems setting volume"
);
return
CommandResult
::
ERROR
;
return
CommandResult
::
ERROR
;
...
...
src/command/QueueCommands.cxx
View file @
993df0fd
...
@@ -249,13 +249,11 @@ CommandResult
...
@@ -249,13 +249,11 @@ CommandResult
handle_playlistinfo
(
Client
&
client
,
ConstBuffer
<
const
char
*>
args
)
handle_playlistinfo
(
Client
&
client
,
ConstBuffer
<
const
char
*>
args
)
{
{
unsigned
start
=
0
,
end
=
std
::
numeric_limits
<
unsigned
>::
max
();
unsigned
start
=
0
,
end
=
std
::
numeric_limits
<
unsigned
>::
max
();
bool
ret
;
if
(
args
.
size
==
1
&&
!
check_range
(
client
,
&
start
,
&
end
,
args
.
front
()))
if
(
args
.
size
==
1
&&
!
check_range
(
client
,
&
start
,
&
end
,
args
.
front
()))
return
CommandResult
::
ERROR
;
return
CommandResult
::
ERROR
;
ret
=
playlist_print_info
(
client
,
client
.
playlist
,
start
,
end
);
if
(
!
playlist_print_info
(
client
,
client
.
playlist
,
start
,
end
))
if
(
!
ret
)
return
print_playlist_result
(
client
,
return
print_playlist_result
(
client
,
PlaylistResult
::
BAD_RANGE
);
PlaylistResult
::
BAD_RANGE
);
...
...
src/command/StickerCommands.cxx
View file @
993df0fd
...
@@ -166,17 +166,15 @@ handle_sticker_song(Client &client, ConstBuffer<const char *> args)
...
@@ -166,17 +166,15 @@ handle_sticker_song(Client &client, ConstBuffer<const char *> args)
}
}
}
}
bool
success
;
struct
sticker_song_find_data
data
=
{
struct
sticker_song_find_data
data
=
{
client
,
client
,
args
[
3
],
args
[
3
],
};
};
success
=
sticker_song_find
(
*
db
,
base_uri
,
data
.
name
,
if
(
!
sticker_song_find
(
*
db
,
base_uri
,
data
.
name
,
op
,
value
,
op
,
value
,
sticker_song_find_print_cb
,
&
data
,
sticker_song_find_print_cb
,
&
data
,
error
);
error
))
{
if
(
!
success
)
{
if
(
error
.
IsDefined
())
if
(
error
.
IsDefined
())
return
print_error
(
client
,
error
);
return
print_error
(
client
,
error
);
...
...
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