All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use fclose() to close the file pointer
@ 2007-10-06 18:41 Bernhard Walle
  2007-10-08  1:11 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Walle @ 2007-10-06 18:41 UTC (permalink / raw)
  To: Simon, Horman, horms; +Cc: kexec

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@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 */

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

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

* Re: [PATCH] Use fclose() to close the file pointer
  2007-10-06 18:41 [PATCH] Use fclose() to close the file pointer Bernhard Walle
@ 2007-10-08  1:11 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2007-10-08  1:11 UTC (permalink / raw)
  To: kexec

On Sat, Oct 06, 2007 at 08:41:38PM +0200, Bernhard Walle wrote:
> 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.

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


_______________________________________________
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:[~2007-10-08  1:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-06 18:41 [PATCH] Use fclose() to close the file pointer Bernhard Walle
2007-10-08  1:11 ` 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.