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
81d5c975
Commit
81d5c975
authored
Aug 30, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtsp_client: check "new_kd" instead of "i"
Eliminate the redundant local variable "i".
parent
f34124a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
rtsp_client.c
src/rtsp_client.c
+2
-4
No files found.
src/rtsp_client.c
View file @
81d5c975
...
@@ -348,7 +348,7 @@ exec_request(struct rtspcl_data *rtspcld, const char *cmd,
...
@@ -348,7 +348,7 @@ exec_request(struct rtspcl_data *rtspcld, const char *cmd,
char
reql
[
128
];
char
reql
[
128
];
const
char
delimiters
[]
=
" "
;
const
char
delimiters
[]
=
" "
;
char
*
token
,
*
dp
;
char
*
token
,
*
dp
;
int
i
,
dsize
=
0
,
rval
;
int
dsize
=
0
,
rval
;
struct
key_data
*
cur_kd
=
*
kd
;
struct
key_data
*
cur_kd
=
*
kd
;
unsigned
int
j
;
unsigned
int
j
;
int
timeout
=
5000
;
// msec unit
int
timeout
=
5000
;
// msec unit
...
@@ -438,10 +438,9 @@ exec_request(struct rtspcl_data *rtspcld, const char *cmd,
...
@@ -438,10 +438,9 @@ exec_request(struct rtspcl_data *rtspcld, const char *cmd,
}
}
struct
key_data
*
new_kd
=
NULL
;
struct
key_data
*
new_kd
=
NULL
;
i
=
0
;
while
(
read_line
(
rtspcld
->
fd
,
line
,
sizeof
(
line
),
timeout
,
0
)
>
0
)
{
while
(
read_line
(
rtspcld
->
fd
,
line
,
sizeof
(
line
),
timeout
,
0
)
>
0
)
{
timeout
=
1000
;
// once it started, it shouldn't take a long time
timeout
=
1000
;
// once it started, it shouldn't take a long time
if
(
i
&&
line
[
0
]
==
' '
)
{
if
(
new_kd
!=
NULL
&&
line
[
0
]
==
' '
)
{
for
(
j
=
0
;
j
<
strlen
(
line
);
j
++
)
if
(
line
[
j
]
!=
' '
)
break
;
for
(
j
=
0
;
j
<
strlen
(
line
);
j
++
)
if
(
line
[
j
]
!=
' '
)
break
;
dsize
+=
strlen
(
line
+
j
);
dsize
+=
strlen
(
line
+
j
);
new_kd
->
data
=
g_realloc
(
new_kd
->
data
,
dsize
);
new_kd
->
data
=
g_realloc
(
new_kd
->
data
,
dsize
);
...
@@ -469,7 +468,6 @@ exec_request(struct rtspcl_data *rtspcld, const char *cmd,
...
@@ -469,7 +468,6 @@ exec_request(struct rtspcl_data *rtspcld, const char *cmd,
cur_kd
->
next
=
new_kd
;
cur_kd
->
next
=
new_kd
;
cur_kd
=
new_kd
;
cur_kd
=
new_kd
;
}
}
i
++
;
}
}
return
true
;
return
true
;
}
}
...
...
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