Older versions of GNU gcc do not allow 'NULL' as sentinel.

They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Michiel van Baak
2008-06-19 20:48:33 +00:00
parent 2e0afd805b
commit 8e8359465b
13 changed files with 85 additions and 73 deletions

View File

@@ -366,7 +366,7 @@ static struct ast_config *realtime_directory(char *context)
/* Get realtime entries, categorized by their mailbox number
and present in the requested context */
rtdata = ast_load_realtime_multientry("voicemail", "mailbox LIKE", "%", "context", context, NULL);
rtdata = ast_load_realtime_multientry("voicemail", "mailbox LIKE", "%", "context", context, SENTINEL);
/* if there are no results, just return the entries from the config file */
if (!rtdata)