diff options
author | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-19 20:48:33 +0000 |
---|---|---|
committer | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-19 20:48:33 +0000 |
commit | c342cdeaf3a971c5df904b312539c7c3082c60f5 (patch) | |
tree | 7b42274bee0dd9b38bbd91570bf09a13d1c6aef0 /pbx | |
parent | f06c83d2c47969db738a3f45b729e6c9906bbbd5 (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: http://svn.digium.com/svn/asterisk/trunk@124127 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_realtime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c index 4fb06c867..536ed9d27 100644 --- a/pbx/pbx_realtime.c +++ b/pbx/pbx_realtime.c @@ -90,9 +90,9 @@ static struct ast_variable *realtime_switch_common(const char *table, const char ematch = "exten"; ast_copy_string(rexten, exten, sizeof(rexten)); } - var = ast_load_realtime(table, ematch, rexten, "context", context, "priority", pri, NULL); + var = ast_load_realtime(table, ematch, rexten, "context", context, "priority", pri, SENTINEL); if (!var) { - cfg = ast_load_realtime_multientry(table, "exten LIKE", "\\_%", "context", context, "priority", pri, NULL); + cfg = ast_load_realtime_multientry(table, "exten LIKE", "\\_%", "context", context, "priority", pri, SENTINEL); if (cfg) { char *cat = ast_category_browse(cfg, NULL); |