libisu: Unify indentation 71/316671/1 accepted/tizen/unified/20240828.082357 accepted/tizen/unified/dev/20240829.043842 accepted/tizen/unified/x/20240829.020354
authorAdam Michalski <a.michalski2@partner.samsung.com>
Mon, 26 Aug 2024 14:25:30 +0000 (16:25 +0200)
committerAdam Michalski <a.michalski2@partner.samsung.com>
Mon, 26 Aug 2024 14:25:30 +0000 (16:25 +0200)
Everything except the copy_content function uses spaces as indentation
characters. Make copy_content consistent with the rest.

Change-Id: Ic6576ee66a5099267971e41f5d6668e0899f8c90

src/libisu/libisu-internal.c

index 56b5e5e291225c0ddadc3496a05ee98b43fe246a..524390084ae1af1685bb0c50d19bf2a8983d71ad 100644 (file)
@@ -84,37 +84,37 @@ static bool is_name_excluded(const char *name, const char **exclude)
 
 static bool copy_file(const char *newsrc, const char *newdst, int mode)
 {
-       const int src_file = open(newsrc, O_RDONLY);
-       if (src_file == -1) {
-               SLOGE("Cannot open file %s: (%d) %m", newsrc, errno);
-               return false;
-       }
-
-       const int dst_file = open(newdst, O_CREAT | O_WRONLY, mode);
-       if (dst_file == -1) {
-               close(src_file);
-               SLOGE("Cannot open file %s: (%d) %m", newdst, errno);
-               return false;
-       }
-
-       bool ret = true;
-       struct stat fileinfo = {0};
-       if (fstat(src_file, &fileinfo) == -1) {
-               SLOGE("Get file %s status error: (%d) %m", newsrc, errno);
-               ret = false;
-               goto exit;
-       }
-
-       if (sendfile(dst_file, src_file, NULL, fileinfo.st_size) == -1) {
-               SLOGE("Copy file content (%s -> %s) error: (%d) %m", newsrc, newdst, errno);
-               ret = false;
-               goto exit;
-       }
+    const int src_file = open(newsrc, O_RDONLY);
+    if (src_file == -1) {
+        SLOGE("Cannot open file %s: (%d) %m", newsrc, errno);
+        return false;
+    }
+
+    const int dst_file = open(newdst, O_CREAT | O_WRONLY, mode);
+    if (dst_file == -1) {
+        close(src_file);
+        SLOGE("Cannot open file %s: (%d) %m", newdst, errno);
+        return false;
+    }
+
+    bool ret = true;
+    struct stat fileinfo = {0};
+    if (fstat(src_file, &fileinfo) == -1) {
+        SLOGE("Get file %s status error: (%d) %m", newsrc, errno);
+        ret = false;
+        goto exit;
+    }
+
+    if (sendfile(dst_file, src_file, NULL, fileinfo.st_size) == -1) {
+        SLOGE("Copy file content (%s -> %s) error: (%d) %m", newsrc, newdst, errno);
+        ret = false;
+        goto exit;
+    }
 
 exit:
-       close(src_file);
-       close(dst_file);
-       return ret;
+    close(src_file);
+    close(dst_file);
+    return ret;
 }
 
 static int copy_content(const char *src, const char *dst, const char **exclude)