[PATCH] Use fclose() to close the file pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just use fclose() instead of close() to close a pointer of type FILE *.
That fixes the compile warning

kexec/kexec.c: In function 'check_reuse_initrd':
kexec/kexec.c:793: warning: passing argument 1 of 'close' makes integer from pointer without a cast


Signed-off-by: Bernhard Walle <bwalle at suse.de>

---
 kexec/kexec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -790,7 +790,7 @@ void check_reuse_initrd(void)
 		    "retain the initrd for reuse.\n");
 	if (line)
 		free(line);
-	close(fp);
+	fclose(fp);
 }
 
 /* Arch hook for reuse_initrd */



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux