1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-12-04 14:46:31 -05:00

Remove unused variable and change out_len to unsigned

This commit is contained in:
Moritz Grimm 2017-09-28 12:40:52 +02:00
parent 8a74a830fc
commit 0e414f6142

View File

@ -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);
} }