Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[maintenance] syslog_stubs.c: avoid using reserved identifier names
Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok committed Mar 4, 2025
commit 299cb6f214ef3139b8e315ee21f7e46c705108b0
8 changes: 4 additions & 4 deletions ocaml/libs/log/syslog_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include <caml/custom.h>
#include <caml/signals.h>

static int __syslog_level_table[] = {
static int syslog_level_table[] = {
LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING,
LOG_NOTICE, LOG_INFO, LOG_DEBUG
};

static int __syslog_facility_table[] = {
static int syslog_facility_table[] = {
LOG_AUTH, LOG_AUTHPRIV, LOG_CRON, LOG_DAEMON, LOG_FTP, LOG_KERN,
LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3,
LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7,
Expand Down Expand Up @@ -54,8 +54,8 @@ value stub_syslog(value facility, value level, value msg)
{
CAMLparam3(facility, level, msg);
char *c_msg = strdup(String_val(msg));
int c_facility = __syslog_facility_table[Int_val(facility)]
| __syslog_level_table[Int_val(level)];
int c_facility = syslog_facility_table[Int_val(facility)]
| syslog_level_table[Int_val(level)];

caml_enter_blocking_section();
syslog(c_facility, "%s", c_msg);
Expand Down