Bug 1109683 - Compare the first character of start_time and stop_time instead of the array itself; r=abr

Caught by clang ToT warning:
comparison of array 'sdp_p->timespec_p->start_time' equal to a null pointer is always false
This commit is contained in:
Ehsan Akhgari 2014-12-10 11:27:13 -05:00
parent 6a31450ee5
commit 2ce0732625
2 changed files with 4 additions and 4 deletions

View File

@ -444,8 +444,8 @@ tinybool sdp_timespec_valid (void *sdp_ptr)
}
if ((sdp_p->timespec_p == NULL) ||
(sdp_p->timespec_p->start_time == '\0') ||
(sdp_p->timespec_p->stop_time == '\0')) {
(sdp_p->timespec_p->start_time[0] == '\0') ||
(sdp_p->timespec_p->stop_time[0] == '\0')) {
return (FALSE);
} else {
return (TRUE);

View File

@ -926,8 +926,8 @@ sdp_result_e sdp_parse_timespec (sdp_t *sdp_p, uint16_t level, const char *ptr)
sdp_result_e sdp_build_timespec (sdp_t *sdp_p, uint16_t level, flex_string *fs)
{
if ((sdp_p->timespec_p == NULL) ||
(sdp_p->timespec_p->start_time == '\0') ||
(sdp_p->timespec_p->stop_time == '\0')) {
(sdp_p->timespec_p->start_time[0] == '\0') ||
(sdp_p->timespec_p->stop_time[0] == '\0')) {
if (sdp_p->conf_p->timespec_reqd == TRUE) {
CSFLogError(logTag, "%s Invalid params for t= time spec line, "
"build failed.", sdp_p->debug_str);