> +static const char * syslog_facility = "loader"; > + > +/* maps our loglevel to syslog loglevel */ > +static int mapLogLevel(int level) > +{ > + int syslog_level; > + switch (level) { > + case DEBUGLVL: > + syslog_level = LOG_DEBUG; > + break; > + case INFO: > + syslog_level = LOG_INFO; > + break; > + case WARNING: > + syslog_level = LOG_WARNING; > + break; > + case CRITICAL: > + syslog_level = LOG_CRIT; > + break; > + case ERROR: > + default: > + /* if someone called us with an invalid level value, log it as an error > + too. */ > + syslog_level = LOG_ERR; > + break; > + } > + return syslog_level; > +} You could simplify this down to just have each branch of the case statement return LOG_* instead of setting a variable and then returning that. Otherwise, both patches look fine. - Chris _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list