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
163597ef
Commit
163597ef
authored
Dec 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/simple: fix implicit nullptr/bool conversion
Return false on error, not nullptr.
parent
95f84afd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
SimpleDatabasePlugin.cxx
src/db/plugins/simple/SimpleDatabasePlugin.cxx
+3
-3
FormatConverter.cxx
src/pcm/FormatConverter.cxx
+1
-1
NfsStorage.cxx
src/storage/plugins/NfsStorage.cxx
+1
-1
No files found.
src/db/plugins/simple/SimpleDatabasePlugin.cxx
View file @
163597ef
...
...
@@ -448,13 +448,13 @@ SimpleDatabase::Mount(const char *uri, Database *db, Error &error)
if
(
r
.
uri
==
nullptr
)
{
error
.
Format
(
db_domain
,
DB_CONFLICT
,
"Already exists: %s"
,
uri
);
return
nullptr
;
return
false
;
}
if
(
strchr
(
r
.
uri
,
'/'
)
!=
nullptr
)
{
error
.
Format
(
db_domain
,
DB_NOT_FOUND
,
"Parent not found: %s"
,
uri
);
return
nullptr
;
return
false
;
}
Directory
*
mnt
=
r
.
directory
->
CreateChild
(
r
.
uri
);
...
...
@@ -481,7 +481,7 @@ SimpleDatabase::Mount(const char *local_uri, const char *storage_uri,
if
(
cache_path
.
IsNull
())
{
error
.
Format
(
db_domain
,
DB_NOT_FOUND
,
"No 'cache_directory' configured"
);
return
nullptr
;
return
false
;
}
std
::
string
name
(
storage_uri
);
...
...
src/pcm/FormatConverter.cxx
View file @
163597ef
...
...
@@ -44,7 +44,7 @@ PcmFormatConverter::Open(SampleFormat _src_format, SampleFormat _dest_format,
"PCM conversion from %s to %s is not implemented"
,
sample_format_to_string
(
_src_format
),
sample_format_to_string
(
_dest_format
));
return
nullptr
;
return
false
;
case
SampleFormat
:
:
S16
:
case
SampleFormat
:
:
S24_P32
:
...
...
src/storage/plugins/NfsStorage.cxx
View file @
163597ef
...
...
@@ -288,7 +288,7 @@ NfsStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow,
return
false
;
if
(
!
WaitConnected
(
error
))
return
nullptr
;
return
false
;
NfsGetInfoOperation
operation
(
*
connection
,
path
.
c_str
(),
info
);
return
operation
.
Run
(
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