Skip to contentSkip to conversation

Use fclose() to close the file pointer

PATCH In review Bernhard Walle 2 participants 2 messages Oct 6, 2007 – Oct 8, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use fclose() to close the file pointer

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

---
 kexec/kexec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kexec/kexec.c +1 -1
@@ -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 */

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

#1 lore raw
Quoted 5 lines · Bernhard Walle

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

Thanks Bernhard, I have applied this change.

Signature · 9 lines
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


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