Skip to content
Snippets Groups Projects
Commit ebacc98f authored by Georges Da Costa's avatar Georges Da Costa
Browse files

cleanup with valgrind

parent 23717da5
Branches
Tags
No related merge requests found
......@@ -10,21 +10,21 @@ mojitos_group: $(OBJECTS_GRP) counters_option.h
gcc $(DEBUG) -O3 -Wall -o mojitos_group $(OBJECTS_GRP) -lpowercap
counters_%.o: counters_%.c counters.h
gcc -c -O3 -Wall $< -o $@
gcc $(DEBUG) -c -O3 -Wall $< -o $@
counters_option.h: counters_option.py
./counters_option.py > counters_option.h
mojitos.o: mojitos.c counters_option.h
gcc -c -O3 -Wall $< -o $@
gcc $(DEBUG) -c -O3 -Wall $< -o $@
debug: DEBUG = -DDEBUG
debug: DEBUG = -DDEBUG -g
debug: all
%.o : %.c %.h
gcc -c -O3 -Wall $< -o $@
gcc $(DEBUG) -c -O3 -Wall $< -o $@
clean:
\rm -f *~ *.o mojitos_group mojitos counters_option.h
......@@ -34,6 +34,7 @@ char **init_network(char* dev) {
char *end_of_dev = index(buffer, '\t');
*end_of_dev='\0';
dev = buffer;
fclose(f);
}
char *filenames[] = {"/sys/class/net/%s/statistics/rx_packets",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment