toolbox

Check-in [f3fbfada10]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:lib: fix bug in jtlst_pop()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f3fbfada103b932bcc55767878e000258289c1091798a80922535e19d40894e0
User & Date: jef 2020-04-29 12:33:47
Context
2020-04-29
13:11
retab: cosmetic changes check-in: 040954acea user: jef tags: trunk
12:33
lib: fix bug in jtlst_pop() check-in: f3fbfada10 user: jef tags: trunk
11:25
retab: fix type in usage() check-in: b63b4f5903 user: jef tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/lib/jtlst.c.

88
89
90
91
92
93
94

95
96
97
98
99
100
101
	if (STAILQ_EMPTY(&arr->list))
		return 0;

	e = STAILQ_FIRST(&arr->list);
	*data = e->data;
	STAILQ_REMOVE_HEAD(&arr->list, next);
	xfree(e);


	return 1;
}

size_t
jtlst_size(jtlst *arr)
{







>







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
	if (STAILQ_EMPTY(&arr->list))
		return 0;

	e = STAILQ_FIRST(&arr->list);
	*data = e->data;
	STAILQ_REMOVE_HEAD(&arr->list, next);
	xfree(e);
	arr->size--;

	return 1;
}

size_t
jtlst_size(jtlst *arr)
{