Skip to contentSkip to conversation

: move vis_format from vis.c to proc.c

B.A.T.M.A.N. Andrew Lunn 1 participant 1 message Jul 16, 2009

lore
Share & tools
lore
#0 lore raw

vis_format is currently in vis.c however this variable is only used in proc.c. Move it into proc, and remove the volatile, which should not be needed.

vis.c +0 -1
Index: vis.c
===================================================================
@@ -42,7 +42,6 @@
 void free_info(void *data);
 void send_vis_packet(struct vis_info *info);
 void start_vis_timer(void);
-volatile uint8_t vis_format = DOT_DRAW;
 
 
 int vis_info_cmp(void *data1, void *data2) {
vis.h +0 -1
Index: vis.h
===================================================================
@@ -51,7 +51,6 @@
 
 extern struct hashtable_t *vis_hash;
 extern spinlock_t vis_hash_lock;
-extern volatile uint8_t vis_format;
 
 void receive_vis_packet(struct ethhdr *ethhdr, struct vis_packet *vis_packet, int vis_info_len);
 void vis_set_mode(int mode);
proc.c +1 -0
Index: proc.c
===================================================================
@@ -31,6 +31,7 @@
 #include "types.h"
 #include "hash.h"
 
+static uint8_t vis_format = DOT_DRAW;
 
 
 static struct proc_dir_entry *proc_batman_dir = NULL, *proc_interface_file = NULL, *proc_orig_interval_file = NULL, *proc_originators_file = NULL;