]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Add missing newlines
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Sat, 18 Feb 2012 05:56:21 +0000 (03:56 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Sat, 18 Feb 2012 05:56:21 +0000 (03:56 -0200)
Checked with following semantic patch for the library:

// smpl
@a@
identifier virtual.func;
expression E1;
expression fmt;
position p1;
@@

func(E1, fmt@p1, ...)

@script:python b@
fmt << a.fmt;
p1 << a.p1;
@@

s = str(fmt)
if s.find("\\n") < 0:
print p1[0].file + ":" + p1[0].line

// smpl

For tools, just remove E1

libkmod/libkmod-config.c
libkmod/libkmod-module.c
testsuite/testsuite.c

index ac9c888dc7d41b54a31960047b1571ef676a6ab6..f2ad4b43d6b952c82ac2b5e48b436aac4a0eed52 100644 (file)
@@ -568,7 +568,7 @@ static int kmod_config_parse(struct kmod_config *config, int fd,
        fp = fdopen(fd, "r");
        if (fp == NULL) {
                err = -errno;
-               ERR(config->ctx, "fd %d: %m", fd);
+               ERR(config->ctx, "fd %d: %m\n", fd);
                close(fd);
                return err;
        }
index 4226bbb16b6d74c0aa2652d5f3c84267fe735e7f..637b79215f1495edef93de0f0ff5f433e4907fc9 100644 (file)
@@ -1012,7 +1012,8 @@ static int __kmod_module_fill_softdep(struct kmod_module *mod,
 
        err = kmod_module_get_softdeps(mod, &pre, &post);
        if (err < 0) {
-               ERR(mod->ctx, "could not get softdep: %s", strerror(-err));
+               ERR(mod->ctx, "could not get softdep: %s\n",
+                                                       strerror(-err));
                goto fail;
        }
 
index c330e4c62c6bee276cfd7770c10d7988d5cdc317..9efe8dedcb91eac4950f0a9ea53c66beb4c193dd 100644 (file)
@@ -205,7 +205,7 @@ static inline int test_run_child(const struct test *t, int fdout[2],
        if (t->output.stdout != NULL) {
                close(fdout[0]);
                if (dup2(fdout[1], STDOUT_FILENO) < 0) {
-                       ERR("could not redirect stdout to pipe: %m");
+                       ERR("could not redirect stdout to pipe: %m\n");
                        exit(EXIT_FAILURE);
                }
        }
@@ -213,7 +213,7 @@ static inline int test_run_child(const struct test *t, int fdout[2],
        if (t->output.stderr != NULL) {
                close(fderr[0]);
                if (dup2(fderr[1], STDERR_FILENO) < 0) {
-                       ERR("could not redirect stdout to pipe: %m");
+                       ERR("could not redirect stdout to pipe: %m\n");
                        exit(EXIT_FAILURE);
                }
        }
@@ -458,7 +458,7 @@ static int prepend_path(const char *extra)
                return setenv("PATH", extra, 1);
 
        if (asprintf(&newpath, "%s:%s", extra, oldpath) < 0) {
-               ERR("failed to allocate memory to new PATH");
+               ERR("failed to allocate memory to new PATH\n");
                return -1;
        }