diff options
author | Simon Horman <horms@verge.net.au> | 2006-09-22 18:48:50 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2006-11-27 12:25:13 +0900 |
commit | acc3c486f3172d13d550a7c58b4e047182e94127 (patch) | |
tree | a787ea50606690861759e603a2f32f49231d99a2 /kdump | |
parent | ccda0410c5bc151ca0ed8d9d0ead2bdbb2a52bc5 (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.c | 2 |
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; |