mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user