Fix condition to remove dead code 41/268941/5
authorSuyeon Hwang <stom.hwang@samsung.com>
Wed, 5 Jan 2022 04:44:56 +0000 (13:44 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Tue, 15 Feb 2022 06:19:47 +0000 (15:19 +0900)
commite9cba360d0dbccbe876c26670072f8ad3e43f31d
treeabb9151ca83565e904b7e67f5cecf9b1d78a535d
parent87df97c35e2b545225a042f22282c4ebb3ce928a
Fix condition to remove dead code

In current code, speak_data is not null if ttsd_data_get_speak_data() returns error none, so null
check on line #99 ~ #102 would become dead code.

To remove this dead code, this patch fixes the condition to check the result of
ttsd_data_get_speak_data(). And this patch fixes some potential memory leak and enhances the
readability.

Change-Id: Ic8dcf0eea79cb57a4a8ad8cf6afc9d59fcd60e49
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
server/ttsd_server.c