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 /res/res_musiconhold.c | |
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 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index a523a0395..2b1605ec3 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -1134,14 +1134,14 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con /* If no moh class found in memory, then check RT */ if (!mohclass && ast_check_realtime("musiconhold")) { if (!ast_strlen_zero(chan->musicclass)) { - var = ast_load_realtime("musiconhold", "name", chan->musicclass, NULL); + var = ast_load_realtime("musiconhold", "name", chan->musicclass, SENTINEL); } if (!var && !ast_strlen_zero(mclass)) - var = ast_load_realtime("musiconhold", "name", mclass, NULL); + var = ast_load_realtime("musiconhold", "name", mclass, SENTINEL); if (!var && !ast_strlen_zero(interpclass)) - var = ast_load_realtime("musiconhold", "name", interpclass, NULL); + var = ast_load_realtime("musiconhold", "name", interpclass, SENTINEL); if (!var) - var = ast_load_realtime("musiconhold", "name", "default", NULL); + var = ast_load_realtime("musiconhold", "name", "default", SENTINEL); if (var && (mohclass = moh_class_malloc())) { mohclass->realtime = 1; for (tmp = var; tmp; tmp = tmp->next) { |