openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/nss-pam-ldapd/0.9.8-r0/nss-pam-ldapd-0.9.8/nslcd/nslcd.c
static void adjust_oom_score(void)
{
    int oom_adj_fd;
    if ((oom_adj_fd = open(OOM_SCORE_ADJ_FILE, O_WRONLY)) >= 0)
    {
        if (write(oom_adj_fd, OOM_SCORE_ADJ, strlen(OOM_SCORE_ADJ)) < 0)
            log_log(LOG_WARNING,
                    "writing oom score adjustment of %s failed: %s",
                    OOM_SCORE_ADJ, strerror(errno));
        close(oom_adj_fd);
    }
    else
    {
        log_log(LOG_DEBUG, "could not open %s to adjust the OOM score: %s",
                OOM_SCORE_ADJ_FILE, strerror(errno));
    }
}
/* poke the OOM killer so nslcd will never get killed */
poke the OOM killer so nslcd will never get killed
poke the OOM killer so nslcd will never get killed
static void adjust_oom_score(void)
{
    int oom_adj_fd;
    if ((oom_adj_fd = open(OOM_SCORE_ADJ_FILE, O_WRONLY)) >= 0)
    {
        if (write(oom_adj_fd, OOM_SCORE_ADJ, strlen(OOM_SCORE_ADJ)) < 0)
            log_log(LOG_WARNING,
                    "writing oom score adjustment of %s failed: %s",
                    OOM_SCORE_ADJ, strerror(errno));
        close(oom_adj_fd);
    }
    else
    {
        log_log(LOG_DEBUG, "could not open %s to adjust the OOM score: %s",
                OOM_SCORE_ADJ_FILE, strerror(errno));
    }
}
static void adjust_oom_score ( void ) { int oom_adj_fd ; if ( ( oom_adj_fd = open ( OOM_SCORE_ADJ_FILE , O_WRONLY ) ) >= 0 ) { if ( write ( oom_adj_fd , OOM_SCORE_ADJ , strlen ( OOM_SCORE_ADJ ) ) < 0 ) log_log ( LOG_WARNING , " " , OOM_SCORE_ADJ , strerror ( errno ) ) ; close ( oom_adj_fd ) ; } else { log_log ( LOG_DEBUG , " " , OOM_SCORE_ADJ_FILE , strerror ( errno ) ) ; } }
poke the OOM killer so nslcd will never get killed
poke the OOM killer so nslcd will never get killed