diff options
author | Michiel van Baak <michiel@vanbaak.info> | 2008-06-19 20:48:33 +0000 |
---|---|---|
committer | Michiel van Baak <michiel@vanbaak.info> | 2008-06-19 20:48:33 +0000 |
commit | 8e8359465b7002ddb955fa898b3c57a35132683f (patch) | |
tree | 7b42274bee0dd9b38bbd91570bf09a13d1c6aef0 /res/res_realtime.c | |
parent | 2e0afd805b263ba915a711f802ae3ad583644adc (diff) |
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
Diffstat (limited to 'res/res_realtime.c')
-rw-r--r-- | res/res_realtime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_realtime.c b/res/res_realtime.c index 297ecb5ba..5ecff8b94 100644 --- a/res/res_realtime.c +++ b/res/res_realtime.c @@ -61,7 +61,7 @@ static char *cli_realtime_load(struct ast_cli_entry *e, int cmd, struct ast_cli_ if (a->argc < 5) return CLI_SHOWUSAGE; - var = ast_load_realtime_all(a->argv[2], a->argv[3], a->argv[4], NULL); + var = ast_load_realtime_all(a->argv[2], a->argv[3], a->argv[4], SENTINEL); if (var) { ast_cli(a->fd, CRL_HEADER_FORMAT, "Column Name", "Column Value"); @@ -97,7 +97,7 @@ static char *cli_realtime_update(struct ast_cli_entry *e, int cmd, struct ast_cl if (a->argc < 7) return CLI_SHOWUSAGE; - res = ast_update_realtime(a->argv[2], a->argv[3], a->argv[4], a->argv[5], a->argv[6], NULL); + res = ast_update_realtime(a->argv[2], a->argv[3], a->argv[4], a->argv[5], a->argv[6], SENTINEL); if(res < 0) { ast_cli(a->fd, "Failed to update. Check the debug log for possible SQL related entries.\n"); |