diff options
author | 2020-12-23 17:39:01 -0800 | |
---|---|---|
committer | 2022-04-30 13:34:21 +0200 | |
commit | cf2c7d48380969200034afeab93169e68c34c397 (patch) | |
tree | a96f518be279922d00898a3ce81dc0ff483a40b2 /src/lockdown.c | |
parent | 6cb13f9e6d3939930aecf91d8e23d1896a3b92e5 (diff) | |
download | libimobiledevice-cf2c7d48380969200034afeab93169e68c34c397.tar.gz libimobiledevice-cf2c7d48380969200034afeab93169e68c34c397.tar.bz2 |
[clang-tidy] Do not use else after return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/lockdown.c')
-rw-r--r-- | src/lockdown.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 25e8c87..d0922dd 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
@@ -163,22 +163,22 @@ lockdownd_error_t lockdown_check_result(plist_t dict, const char *query_match) | |||
163 | 163 | ||
164 | if (plist_get_node_type(query_node) != PLIST_STRING) { | 164 | if (plist_get_node_type(query_node) != PLIST_STRING) { |
165 | return ret; | 165 | return ret; |
166 | } else { | 166 | } |
167 | char *query_value = NULL; | ||
168 | 167 | ||
169 | plist_get_string_val(query_node, &query_value); | 168 | char *query_value = NULL; |
170 | if (!query_value) { | ||
171 | return ret; | ||
172 | } | ||
173 | 169 | ||
174 | if (query_match && (strcmp(query_value, query_match) != 0)) { | 170 | plist_get_string_val(query_node, &query_value); |
175 | free(query_value); | 171 | if (!query_value) { |
176 | return ret; | 172 | return ret; |
177 | } | 173 | } |
178 | 174 | ||
175 | if (query_match && (strcmp(query_value, query_match) != 0)) { | ||
179 | free(query_value); | 176 | free(query_value); |
177 | return ret; | ||
180 | } | 178 | } |
181 | 179 | ||
180 | free(query_value); | ||
181 | |||
182 | plist_t result_node = plist_dict_get_item(dict, "Result"); | 182 | plist_t result_node = plist_dict_get_item(dict, "Result"); |
183 | if (!result_node) { | 183 | if (!result_node) { |
184 | /* iOS 5: the 'Result' key is not present anymore. | 184 | /* iOS 5: the 'Result' key is not present anymore. |