git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] imap-send: cleanup execl() call to use NULL sentinel instead of 0
@ 2006-03-11  8:55 Marco Roeland
  2006-03-11 14:01 ` Morten Welinder
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Roeland @ 2006-03-11  8:55 UTC (permalink / raw)
  To: Mike McCormack; +Cc: git

Some versions of gcc check that calls to the exec() family have the proper
sentinel for variadic calls. This should be (char *) NULL according to the
man page. Although for all other purposes the 0 is equivalent, gcc
nevertheless does emit a warning for 0 and not for NULL. This also makes the
usage consistent throughout git.

The whitespace in function calls throughout imap-send.c has its own style,
so I left it that way.

---

 imap-send.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

db1a0875cbc28970208e7a2fbb93d680d8ffe572
diff --git a/imap-send.c b/imap-send.c
index fddaac0..203284d 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -945,7 +945,7 @@ imap_open_store( imap_server_conf_t *srv
 				_exit( 127 );
 			close( a[0] );
 			close( a[1] );
-			execl( "/bin/sh", "sh", "-c", srvc->tunnel, 0 );
+			execl( "/bin/sh", "sh", "-c", srvc->tunnel, NULL );
 			_exit( 127 );
 		}
 
-- 
1.2.4.ge29f
Marco Roeland

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

end of thread, other threads:[~2006-03-11 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-11  8:55 [PATCH] imap-send: cleanup execl() call to use NULL sentinel instead of 0 Marco Roeland
2006-03-11 14:01 ` Morten Welinder
2006-03-11 20:30   ` Marco Roeland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).