Browse Source

Fix some issues due to static analyze

Serj Kalichev 10 years ago
parent
commit
6f35b56ac5
2 changed files with 5 additions and 3 deletions
  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;
 };