[Libreoffice-commits] core.git: soltools/cpp soltools/mkdepend

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 6 06:08:22 UTC 2019


 soltools/cpp/_include.c |   28 ++++++++++++++--------------
 soltools/mkdepend/pr.c  |   26 +++++++++++++-------------
 2 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit dcc06dee258e04eff0140901d6e2e783ec3e2dd8
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Feb 5 14:05:15 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Feb 6 07:07:57 2019 +0100

    loplugin:flatten in soltools
    
    Change-Id: I3df754c58c90978ef5fccc90518ad1af92516a9e
    Reviewed-on: https://gerrit.libreoffice.org/67404
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/soltools/cpp/_include.c b/soltools/cpp/_include.c
index 1404aa4887a5..c9f20537f5eb 100644
--- a/soltools/cpp/_include.c
+++ b/soltools/cpp/_include.c
@@ -227,24 +227,24 @@ void
     static Tokenrow tr = {&ta, &ta, &ta + 1, 1};
     uchar *p;
 
-    if (Cplusplus)
-    {
-        ta.t = p = (uchar *) outptr;
+    if (!Cplusplus)
+        return;
 
-        if (! end)
-            strcpy((char *) p, "extern \"C\" {");
-        else
-            strcpy((char *) p, "}");
+    ta.t = p = (uchar *) outptr;
 
-        p += strlen((char *) p);
+    if (! end)
+        strcpy((char *) p, "extern \"C\" {");
+    else
+        strcpy((char *) p, "}");
 
-        *p++ = '\n';
+    p += strlen((char *) p);
 
-        ta.len = (char *) p - outptr;
-        outptr = (char *) p;
-        tr.tp = tr.bp;
-        puttokens(&tr);
-    }
+    *p++ = '\n';
+
+    ta.len = (char *) p - outptr;
+    outptr = (char *) p;
+    tr.tp = tr.bp;
+    puttokens(&tr);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c
index 391e39dfcd20..731b2f16626e 100644
--- a/soltools/mkdepend/pr.c
+++ b/soltools/mkdepend/pr.c
@@ -56,19 +56,19 @@ void add_include(struct filepointer *filep, struct inclist *file, struct inclist
         show_where_not = FALSE;
     }
 
-    if (newfile) {
-
-        /* Only add new dependency files if they don't have "/usr/include" in them. */
-        if (!(newfile->i_file && strstr(newfile->i_file, "/usr/"))) {
-            included_by(file, newfile);
-        }
-
-        if (!newfile->i_searched) {
-            newfile->i_searched = TRUE;
-            content = getfile(newfile->i_file);
-            find_includes(content, newfile, file_red, 0, failOK, incCollection, symbols);
-            freefile(content);
-        }
+    if (!newfile)
+        return;
+
+    /* Only add new dependency files if they don't have "/usr/include" in them. */
+    if (!(newfile->i_file && strstr(newfile->i_file, "/usr/"))) {
+        included_by(file, newfile);
+    }
+
+    if (!newfile->i_searched) {
+        newfile->i_searched = TRUE;
+        content = getfile(newfile->i_file);
+        find_includes(content, newfile, file_red, 0, failOK, incCollection, symbols);
+        freefile(content);
     }
 }
 


More information about the Libreoffice-commits mailing list