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