Skip to contentSkip to conversation

kexec/crashdump.c: improve the code a bit

PATCH Applied WANG Cong 2 participants 2 messages Jun 24, 2008 – Jun 27, 2008

Subsystems (2)
lore
Share & tools
lore

WANG Cong

author
#0 lore raw

PATCH 1/1 kexec/crashdump.c: improve the code a bit

Add the missing fclose().
Constify a char pointer.

---

kexec/crashdump.c +3 -1
index e0ba36d..92de524 100644
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Applied
#1 lore raw
Quoted 3 lines · WANG Cong

Add the missing fclose().
Constify a char pointer.

Thanks, applied.

Signature · 7 lines
Horms


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec