mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-12 07:23:24 -05:00
minor signed/unsigned cleanups
This commit is contained in:
parent
667d77a466
commit
208ef6b1f2
@ -389,7 +389,7 @@ static void fmturl(char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
char *safe = "abcdefghijklmnopqrstuvwxyz"
|
char *safe = "abcdefghijklmnopqrstuvwxyz"
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
"0123456789$-_.!*(),/@\\";
|
"0123456789$-_.!*(),/@\\";
|
||||||
current=value;
|
current=(unsigned char *)value;
|
||||||
while(*current) {
|
while(*current) {
|
||||||
if(strchr(safe,*current)) {
|
if(strchr(safe,*current)) {
|
||||||
len++;
|
len++;
|
||||||
@ -399,13 +399,13 @@ static void fmturl(char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
current++;
|
current++;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_string = (char*) malloc(len+1);
|
new_string = (unsigned char*) malloc(len+1);
|
||||||
if(!new_string) {
|
if(!new_string) {
|
||||||
fmtstr(buffer,currlen,maxlen,value,flags,min,max);
|
fmtstr(buffer,currlen,maxlen,value,flags,min,max);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
current = value;
|
current = (unsigned char *)value;
|
||||||
dest = new_string;
|
dest = new_string;
|
||||||
while(*current) {
|
while(*current) {
|
||||||
if(strchr(safe,*current)) {
|
if(strchr(safe,*current)) {
|
||||||
@ -423,7 +423,7 @@ static void fmturl(char *buffer, size_t *currlen, size_t maxlen,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*dest = '\0';
|
*dest = '\0';
|
||||||
fmtstr(buffer,currlen,maxlen,new_string,flags,min,max);
|
fmtstr(buffer,currlen,maxlen,(char*)new_string,flags,min,max);
|
||||||
free(new_string);
|
free(new_string);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ static TAGHANDLER taghandlers[] = {
|
|||||||
{ "mpp", scan_get_mpcinfo, "mpc", "mpc", 0, "Musepack audio file" },
|
{ "mpp", scan_get_mpcinfo, "mpc", "mpc", 0, "Musepack audio file" },
|
||||||
{ "mp+", scan_get_mpcinfo, "mpc", "mpc", 0, "Musepack audio file" },
|
{ "mp+", scan_get_mpcinfo, "mpc", "mpc", 0, "Musepack audio file" },
|
||||||
#endif
|
#endif
|
||||||
{ NULL, NULL, NULL, NULL, NULL }
|
{ NULL, NULL, NULL, NULL, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct tag_playlistlist {
|
typedef struct tag_playlistlist {
|
||||||
|
@ -362,9 +362,10 @@ int scan_mp3_get_mp3tags(char *file, MP3FILE *pmp3) {
|
|||||||
#ifdef HAVE_ICONV
|
#ifdef HAVE_ICONV
|
||||||
/* this is kinda cheesy, but ucs4* == char* for 8859-1 */
|
/* this is kinda cheesy, but ucs4* == char* for 8859-1 */
|
||||||
free(utf8_text);
|
free(utf8_text);
|
||||||
utf8_text = util_xtoutf8_alloc((unsigned char*)native_text,
|
utf8_text =
|
||||||
strlen((char*)native_text),
|
(char*)util_xtoutf8_alloc((unsigned char*)native_text,
|
||||||
conversion_codepage);
|
strlen((char*)native_text),
|
||||||
|
conversion_codepage);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,8 +147,8 @@ int util_xtoy(unsigned char *dbuffer, int dlen, unsigned char *sbuffer, int slen
|
|||||||
/* type punning warnings */
|
/* type punning warnings */
|
||||||
size_t st_dlen = (size_t)dlen;
|
size_t st_dlen = (size_t)dlen;
|
||||||
size_t st_slen = (size_t)slen;
|
size_t st_slen = (size_t)slen;
|
||||||
char *st_dbuffer = dbuffer;
|
char *st_dbuffer = (char*)dbuffer;
|
||||||
ICONV_CONST char *st_sbuffer = sbuffer;
|
ICONV_CONST char *st_sbuffer = (char*)sbuffer;
|
||||||
|
|
||||||
memset(dbuffer,0,dlen);
|
memset(dbuffer,0,dlen);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user