All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] kexec/crashdump.c: improve the code a bit
@ 2008-06-24 21:03 WANG Cong
  2008-06-27  2:33 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: WANG Cong @ 2008-06-24 21:03 UTC (permalink / raw)
  To: horms; +Cc: kexec


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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] kexec/crashdump.c: improve the code a bit
  2008-06-24 21:03 [Patch] kexec/crashdump.c: improve the code a bit WANG Cong
@ 2008-06-27  2:33 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2008-06-27  2:33 UTC (permalink / raw)
  To: WANG Cong; +Cc: kexec

On Tue, Jun 24, 2008 at 10:03:56PM +0100, WANG Cong wrote:
> 
> Add the missing fclose().
> Constify a char pointer.

Thanks, applied.

-- 
Horms


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-27  2:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 21:03 [Patch] kexec/crashdump.c: improve the code a bit WANG Cong
2008-06-27  2:33 ` Simon Horman

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.