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
41a48b14
Commit
41a48b14
authored
Dec 16, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cue_tag: changed runtime checks to assertions
It's illegal to pass NULL here. This should not be ignored silently.
parent
5821bd1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
cue_tag.c
src/cue/cue_tag.c
+9
-14
No files found.
src/cue/cue_tag.c
View file @
41a48b14
...
...
@@ -3,6 +3,7 @@
#include "tag.h"
#include <libcue/libcue.h>
#include <assert.h>
static
struct
tag
*
cue_tag_cd
(
struct
Cdtext
*
cdtext
,
struct
Rem
*
rem
)
...
...
@@ -10,8 +11,7 @@ cue_tag_cd(struct Cdtext *cdtext, struct Rem *rem)
struct
tag
*
tag
;
char
*
tmp
;
//if (cdtext == NULL)
//return NULL;
assert
(
cdtext
!=
NULL
);
tag
=
tag_new
();
...
...
@@ -98,8 +98,7 @@ cue_tag_track(struct Cdtext *cdtext, struct Rem *rem)
struct
tag
*
tag
;
char
*
tmp
;
//if (cdtext == NULL)
//return NULL;
assert
(
cdtext
!=
NULL
);
tag
=
tag_new
();
...
...
@@ -162,14 +161,12 @@ cue_tag_file(FILE *fp, unsigned tnum)
struct
Cd
*
cd
;
struct
tag
*
cd_tag
,
*
track_tag
;
if
(
tnum
>
256
)
return
NULL
;
assert
(
fp
!=
NULL
);
if
(
fp
==
NULL
)
if
(
tnum
>
256
)
return
NULL
;
else
cd
=
cue_parse_file
(
fp
);
cd
=
cue_parse_file
(
fp
);
if
(
cd
==
NULL
)
return
NULL
;
...
...
@@ -201,14 +198,12 @@ cue_tag_string(char *str, unsigned tnum)
struct
Cd
*
cd
;
struct
tag
*
cd_tag
,
*
track_tag
;
if
(
tnum
>
256
)
return
NULL
;
assert
(
str
!=
NULL
);
if
(
str
==
NULL
)
if
(
tnum
>
256
)
return
NULL
;
else
cd
=
cue_parse_string
(
str
);
cd
=
cue_parse_string
(
str
);
if
(
cd
==
NULL
)
return
NULL
;
...
...
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