Explorar el Código

faux.log: Minimal style fixes

Serj Kalichev hace 4 años
padre
commit
787b096a30
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      faux/log/log.c

+ 3 - 2
faux/log/log.c

@@ -42,7 +42,7 @@ static struct log_name log_names[] = {
 	{"syslog", LOG_SYSLOG},
 	{"user", LOG_USER},
 	{"uucp", LOG_UUCP},
-	{NULL, 0},		// end of list
+	{NULL, 0}, // end of list
 };
 
 /** @brief Parses syslog facility string and returns the facility id.
@@ -56,12 +56,13 @@ static struct log_name log_names[] = {
  */
 int faux_log_facility(const char *str, int *facility) {
 
-	int i;
+	int i = 0;
 
 	assert(facility);
 	assert(str);
 	if (!str || !facility)
 		return -1;
+
 	for (i = 0; log_names[i].name; i++) {
 		if (faux_str_casecmp(str, log_names[i].name) == 0) {
 			*facility = log_names[i].facility;