Procházet zdrojové kódy

Fix some issues due to static analyze

Serj Kalichev před 10 roky
rodič
revize
6f35b56ac5
2 změnil soubory, kde provedl 5 přidání a 3 odebrání
  1. 4 2
      birq.c
  2. 1 1
      lub/list/private.h

+ 4 - 2
birq.c

@@ -165,8 +165,10 @@ int main(int argc, char **argv)
 
 		t = time(NULL);
 		tmp = localtime(&t);
-		strftime(outstr, sizeof(outstr), "%H:%M:%S", tmp);
-		printf("----[ %s ]----------------------------------------------------------------\n", outstr);
+		if (tmp) {
+			strftime(outstr, sizeof(outstr), "%H:%M:%S", tmp);
+			printf("----[ %s ]----------------------------------------------------------------\n", outstr);
+		}
 
 		/* Rescan PCI devices for new IRQs. */
 		scan_irqs(irqs, balance_irqs, pxms);

+ 1 - 1
lub/list/private.h

@@ -10,5 +10,5 @@ struct lub_list_s {
 	lub_list_node_t *head;
 	lub_list_node_t *tail;
 	lub_list_compare_fn *compareFn;
-	int len;
+	unsigned int len;
 };