From: Marco Roeland <marco.roeland@xs4all.nl>
To: Mike McCormack <mike@codeweavers.com>
Cc: git@vger.kernel.org
Subject: [PATCH] imap-send: cleanup execl() call to use NULL sentinel instead of 0
Date: Sat, 11 Mar 2006 09:55:50 +0100 [thread overview]
Message-ID: <20060311085550.GA32089@fiberbit.xs4all.nl> (raw)
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
next reply other threads:[~2006-03-11 8:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-11 8:55 Marco Roeland [this message]
2006-03-11 14:01 ` [PATCH] imap-send: cleanup execl() call to use NULL sentinel instead of 0 Morten Welinder
2006-03-11 20:30 ` Marco Roeland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060311085550.GA32089@fiberbit.xs4all.nl \
--to=marco.roeland@xs4all.nl \
--cc=git@vger.kernel.org \
--cc=mike@codeweavers.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).