mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-11-03 04:17:18 -05:00
Remove unused variable and change out_len to unsigned
This commit is contained in:
parent
8a74a830fc
commit
0e414f6142
@ -301,8 +301,7 @@ char *
|
|||||||
util_shellquote(const char *in, size_t outlen_max)
|
util_shellquote(const char *in, size_t outlen_max)
|
||||||
{
|
{
|
||||||
char *out, *out_p;
|
char *out, *out_p;
|
||||||
ssize_t out_len;
|
size_t out_len;
|
||||||
size_t out_siz;
|
|
||||||
const char *in_p;
|
const char *in_p;
|
||||||
|
|
||||||
if (!outlen_max || outlen_max > SHELLQUOTE_OUTLEN_MAX)
|
if (!outlen_max || outlen_max > SHELLQUOTE_OUTLEN_MAX)
|
||||||
@ -321,7 +320,7 @@ util_shellquote(const char *in, size_t outlen_max)
|
|||||||
|
|
||||||
switch (*in_p) {
|
switch (*in_p) {
|
||||||
case '\'':
|
case '\'':
|
||||||
if (out_len > 4) {
|
if (4 < out_len) {
|
||||||
*out_p++ = '\'';
|
*out_p++ = '\'';
|
||||||
*out_p++ = '\\';
|
*out_p++ = '\\';
|
||||||
*out_p++ = '\'';
|
*out_p++ = '\'';
|
||||||
@ -338,6 +337,7 @@ util_shellquote(const char *in, size_t outlen_max)
|
|||||||
out_len--;
|
out_len--;
|
||||||
}
|
}
|
||||||
*out_p++ = '\'';
|
*out_p++ = '\'';
|
||||||
|
out_len--;
|
||||||
|
|
||||||
return (out);
|
return (out);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user