summaryrefslogtreecommitdiff
path: root/kdump
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2006-09-22 18:48:50 +0900
committerSimon Horman <horms@verge.net.au>2006-11-27 12:25:13 +0900
commitacc3c486f3172d13d550a7c58b4e047182e94127 (patch)
treea787ea50606690861759e603a2f32f49231d99a2 /kdump
parentccda0410c5bc151ca0ed8d9d0ead2bdbb2a52bc5 (diff)
kexec-tools: make sure written is initialised in write_all()
I noticed this because of a compiler warning, and I guess it was working as the memory that written is occupying happens to be 0. Signed-Off-By: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kdump')
-rw-r--r--kdump/kdump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kdump/kdump.c b/kdump/kdump.c
index e3a7c99..5614a46 100644
--- a/kdump/kdump.c
+++ b/kdump/kdump.c
@@ -188,7 +188,7 @@ static void *generate_new_headers(
static void write_all(int fd, const void *buf, size_t count)
{
- ssize_t result, written;
+ ssize_t result, written = 0;
const char *ptr;
size_t left;
ptr = buf;