]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/coredump.c
xfs: remove redundant checks from xfs_da_read_buf
[karo-tx-linux.git] / fs / coredump.c
index bc3fbcd32558fd61823b126997ace2785d7bac21..0b2528fb640e77e4a38a351c51f8a01f12102c14 100644 (file)
@@ -40,7 +40,6 @@
 
 #include <trace/events/task.h>
 #include "internal.h"
-#include "coredump.h"
 
 #include <trace/events/sched.h>
 
@@ -74,10 +73,15 @@ static int expand_corename(struct core_name *cn, int size)
 static int cn_vprintf(struct core_name *cn, const char *fmt, va_list arg)
 {
        int free, need;
+       va_list arg_copy;
 
 again:
        free = cn->size - cn->used;
-       need = vsnprintf(cn->corename + cn->used, free, fmt, arg);
+
+       va_copy(arg_copy, arg);
+       need = vsnprintf(cn->corename + cn->used, free, fmt, arg_copy);
+       va_end(arg_copy);
+
        if (need < free) {
                cn->used += need;
                return 0;