diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-05 14:05:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-06 07:07:57 +0100 |
commit | dcc06dee258e04eff0140901d6e2e783ec3e2dd8 (patch) | |
tree | 802dc2d00336c7da9e504ee5c7d85b58c1b037d1 | |
parent | 6770cddd9d8fad5a151129c5f3d17ac2d7d39b9e (diff) |
loplugin:flatten in soltools
Change-Id: I3df754c58c90978ef5fccc90518ad1af92516a9e
Reviewed-on: https://gerrit.libreoffice.org/67404
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | soltools/cpp/_include.c | 28 | ||||
-rw-r--r-- | soltools/mkdepend/pr.c | 26 |
2 files changed, 27 insertions, 27 deletions
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); } } |