From: WANG Cong <xiyou.wangcong@gmail.com>
To: horms@verge.net.au
Cc: kexec@lists.infradead.org
Subject: [Patch] kexec/crashdump.c: improve the code a bit
Date: Tue, 24 Jun 2008 22:03:56 +0100 [thread overview]
Message-ID: <20080624210356.GA8177@hack.netcabo.pt> (raw)
Add the missing fclose().
Constify a char pointer.
Signed-off-by: WANG Cong <wangcong@zeuux.org>
---
diff --git a/kexec/crashdump.c b/kexec/crashdump.c
index e0ba36d..92de524 100644
--- a/kexec/crashdump.c
+++ b/kexec/crashdump.c
@@ -107,10 +107,11 @@ int get_crash_notes_per_cpu(int cpu, uint64_t *addr, uint64_t *len)
printf("crash_notes addr = %Lx\n", *addr);
#endif
+ fclose(fp);
return 0;
}
-static int get_vmcoreinfo(char *kdump_info, uint64_t *addr, uint64_t *len)
+static int get_vmcoreinfo(const char *kdump_info, uint64_t *addr, uint64_t *len)
{
char line[MAX_LINE];
int count;
@@ -132,6 +133,7 @@ static int get_vmcoreinfo(char *kdump_info, uint64_t *addr, uint64_t *len)
*addr = (uint64_t) temp;
*len = (uint64_t) temp2;
+ fclose(fp);
return 0;
}
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next reply other threads:[~2008-06-24 21:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 21:03 WANG Cong [this message]
2008-06-27 2:33 ` [Patch] kexec/crashdump.c: improve the code a bit Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080624210356.GA8177@hack.netcabo.pt \
--to=xiyou.wangcong@gmail.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.