Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 706966
Collapse All | Expand All

(-)a/src/serial/sball.c (-4 / +4 lines)
Lines 60-66 struct event { Link Here
60
};
60
};
61
61
62
static struct event *ev_free_list;
62
static struct event *ev_free_list;
63
int evpool_size;
63
int sball_evpool_size =0;
64
64
65
static struct event *alloc_event(void);
65
static struct event *alloc_event(void);
66
static void free_event(struct event *ev);
66
static void free_event(struct event *ev);
Lines 662-677 static struct event *alloc_event(void) Link Here
662
		ev_free_list = ev->next;
662
		ev_free_list = ev->next;
663
	} else {
663
	} else {
664
		ev = malloc(sizeof *ev);
664
		ev = malloc(sizeof *ev);
665
		evpool_size++;
665
		sball_evpool_size++;
666
	}
666
	}
667
	return ev;
667
	return ev;
668
}
668
}
669
669
670
static void free_event(struct event *ev)
670
static void free_event(struct event *ev)
671
{
671
{
672
	if(evpool_size > 512) {
672
	if(sball_evpool_size > 512) {
673
		free(ev);
673
		free(ev);
674
		evpool_size--;
674
		sball_evpool_size--;
675
	} else {
675
	} else {
676
		ev->next = ev_free_list;
676
		ev->next = ev_free_list;
677
		ev_free_list = ev;
677
		ev_free_list = ev;
(-)a/src/spnavd.c (+3 lines)
Lines 48-53 static char *fix_path(char *str); Link Here
48
static char *cfgfile = DEF_CFGFILE;
48
static char *cfgfile = DEF_CFGFILE;
49
static char *logfile = DEF_LOGFILE;
49
static char *logfile = DEF_LOGFILE;
50
50
51
struct cfg cfg;
52
int verbose;
53
51
int main(int argc, char **argv)
54
int main(int argc, char **argv)
52
{
55
{
53
	int i, pid, ret, become_daemon = 1;
56
	int i, pid, ret, become_daemon = 1;
(-)a/src/spnavd.h (-4 / +2 lines)
Lines 47-55 along with this program. If not, see <http://www.gnu.org/licenses/>. Link Here
47
47
48
#endif
48
#endif
49
49
50
50
extern struct cfg cfg;
51
51
extern int verbose;
52
struct cfg cfg;
53
int verbose;
54
52
55
#endif	/* SPNAVD_H_ */
53
#endif	/* SPNAVD_H_ */

Return to bug 706966