mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
core-util: Use size_t for out parameter of pa_split_*in_place()
pa_split_in_place() and pa_split_spaces_in_place() are modifed to use size_t type instead of integer type. alsa-ucm.c is revised according to this change. Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
This commit is contained in:
parent
c235acd787
commit
eec27ec686
3 changed files with 6 additions and 6 deletions
|
|
@ -801,7 +801,7 @@ static int ucm_port_contains(const char *port_name, const char *dev_name, bool i
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
const char *r;
|
const char *r;
|
||||||
const char *state = NULL;
|
const char *state = NULL;
|
||||||
int len;
|
size_t len;
|
||||||
|
|
||||||
if (!port_name || !dev_name)
|
if (!port_name || !dev_name)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -924,7 +924,7 @@ char *pa_split(const char *c, const char *delimiter, const char**state) {
|
||||||
* as-is without the length parameter, since it is merely pointing to a point
|
* as-is without the length parameter, since it is merely pointing to a point
|
||||||
* within the original string. The variable state points to, should be
|
* within the original string. The variable state points to, should be
|
||||||
* initialized to NULL before the first call. */
|
* initialized to NULL before the first call. */
|
||||||
const char *pa_split_in_place(const char *c, const char *delimiter, int *n, const char**state) {
|
const char *pa_split_in_place(const char *c, const char *delimiter, size_t *n, const char**state) {
|
||||||
const char *current = *state ? *state : c;
|
const char *current = *state ? *state : c;
|
||||||
size_t l;
|
size_t l;
|
||||||
|
|
||||||
|
|
@ -960,7 +960,7 @@ char *pa_split_spaces(const char *c, const char **state) {
|
||||||
/* Similar to pa_split_spaces, except this returns a string in-place.
|
/* Similar to pa_split_spaces, except this returns a string in-place.
|
||||||
Returned string is generally not NULL-terminated.
|
Returned string is generally not NULL-terminated.
|
||||||
See pa_split_in_place(). */
|
See pa_split_in_place(). */
|
||||||
const char *pa_split_spaces_in_place(const char *c, int *n, const char **state) {
|
const char *pa_split_spaces_in_place(const char *c, size_t *n, const char **state) {
|
||||||
const char *current = *state ? *state : c;
|
const char *current = *state ? *state : c;
|
||||||
size_t l;
|
size_t l;
|
||||||
|
|
||||||
|
|
@ -2859,7 +2859,7 @@ bool pa_str_in_list(const char *haystack, const char *delimiters, const char *ne
|
||||||
/* Checks a whitespace-separated list of words in haystack for needle */
|
/* Checks a whitespace-separated list of words in haystack for needle */
|
||||||
bool pa_str_in_list_spaces(const char *haystack, const char *needle) {
|
bool pa_str_in_list_spaces(const char *haystack, const char *needle) {
|
||||||
const char *s;
|
const char *s;
|
||||||
int n;
|
size_t n;
|
||||||
const char *state = NULL;
|
const char *state = NULL;
|
||||||
|
|
||||||
if (!haystack || !needle)
|
if (!haystack || !needle)
|
||||||
|
|
|
||||||
|
|
@ -109,9 +109,9 @@ static inline const char *pa_strna(const char *x) {
|
||||||
}
|
}
|
||||||
|
|
||||||
char *pa_split(const char *c, const char *delimiters, const char **state);
|
char *pa_split(const char *c, const char *delimiters, const char **state);
|
||||||
const char *pa_split_in_place(const char *c, const char *delimiters, int *n, const char **state);
|
const char *pa_split_in_place(const char *c, const char *delimiters, size_t *n, const char **state);
|
||||||
char *pa_split_spaces(const char *c, const char **state);
|
char *pa_split_spaces(const char *c, const char **state);
|
||||||
const char *pa_split_spaces_in_place(const char *c, int *n, const char **state);
|
const char *pa_split_spaces_in_place(const char *c, size_t *n, const char **state);
|
||||||
|
|
||||||
char *pa_strip_nl(char *s);
|
char *pa_strip_nl(char *s);
|
||||||
char *pa_strip(char *s);
|
char *pa_strip(char *s);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue