kexec/crashdump.c: improve the code a bit
Subsystems (2)
PATCH 1/1 kexec/crashdump.c: improve the code a bit
Add the missing fclose().
Constify a char pointer.
Signed-off-by WANG Cong <[email protected]>
---
kexec/crashdump.c +3 -1
@@ -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
Simon Horman
AppliedQuoted 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