diff options
| author | 2020-06-07 21:48:10 -0700 | |
|---|---|---|
| committer | 2020-11-24 01:06:31 +0100 | |
| commit | 9f60cdd76b6044931cc2f2b6f2fbec3deb67a425 (patch) | |
| tree | 66c1a3c42769535966367c3f6f10881da2673f33 /test/plist_test.c | |
| parent | 2899553df92cd4e10590da73ae7375e5b5517d45 (diff) | |
| download | libplist-9f60cdd76b6044931cc2f2b6f2fbec3deb67a425.tar.gz libplist-9f60cdd76b6044931cc2f2b6f2fbec3deb67a425.tar.bz2 | |
Improve code readability by not using else after return
[clang-tidy] Found with readability-else-after-return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'test/plist_test.c')
| -rw-r--r-- | test/plist_test.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test/plist_test.c b/test/plist_test.c index b498e1d..6e3947a 100644 --- a/test/plist_test.c +++ b/test/plist_test.c | |||
| @@ -77,36 +77,32 @@ int main(int argc, char *argv[]) | |||
| 77 | printf("PList XML parsing failed\n"); | 77 | printf("PList XML parsing failed\n"); |
| 78 | return 3; | 78 | return 3; |
| 79 | } | 79 | } |
| 80 | else | ||
| 81 | printf("PList XML parsing succeeded\n"); | ||
| 82 | 80 | ||
| 81 | printf("PList XML parsing succeeded\n"); | ||
| 83 | plist_to_bin(root_node1, &plist_bin, &size_out); | 82 | plist_to_bin(root_node1, &plist_bin, &size_out); |
| 84 | if (!plist_bin) | 83 | if (!plist_bin) |
| 85 | { | 84 | { |
| 86 | printf("PList BIN writing failed\n"); | 85 | printf("PList BIN writing failed\n"); |
| 87 | return 4; | 86 | return 4; |
| 88 | } | 87 | } |
| 89 | else | ||
| 90 | printf("PList BIN writing succeeded\n"); | ||
| 91 | 88 | ||
| 89 | printf("PList BIN writing succeeded\n"); | ||
| 92 | plist_from_bin(plist_bin, size_out, &root_node2); | 90 | plist_from_bin(plist_bin, size_out, &root_node2); |
| 93 | if (!root_node2) | 91 | if (!root_node2) |
| 94 | { | 92 | { |
| 95 | printf("PList BIN parsing failed\n"); | 93 | printf("PList BIN parsing failed\n"); |
| 96 | return 5; | 94 | return 5; |
| 97 | } | 95 | } |
| 98 | else | ||
| 99 | printf("PList BIN parsing succeeded\n"); | ||
| 100 | 96 | ||
| 97 | printf("PList BIN parsing succeeded\n"); | ||
| 101 | plist_to_xml(root_node2, &plist_xml2, &size_out2); | 98 | plist_to_xml(root_node2, &plist_xml2, &size_out2); |
| 102 | if (!plist_xml2) | 99 | if (!plist_xml2) |
| 103 | { | 100 | { |
| 104 | printf("PList XML writing failed\n"); | 101 | printf("PList XML writing failed\n"); |
| 105 | return 8; | 102 | return 8; |
| 106 | } | 103 | } |
| 107 | else | ||
| 108 | printf("PList XML writing succeeded\n"); | ||
| 109 | 104 | ||
| 105 | printf("PList XML writing succeeded\n"); | ||
| 110 | if (plist_xml2) | 106 | if (plist_xml2) |
| 111 | { | 107 | { |
| 112 | FILE *oplist = NULL; | 108 | FILE *oplist = NULL; |
