version 1.32.2.4, 2014/01/22 21:02:54 |
version 1.32.2.7, 2014/08/11 00:31:13 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
#include "config.h" |
#endif |
|
|
|
#include <sys/param.h> |
#include <sys/param.h> |
|
#include <sys/types.h> |
|
|
#include <assert.h> |
#include <assert.h> |
#include <fcntl.h> |
#include <fcntl.h> |
|
|
#include "mandocdb.h" |
#include "mandocdb.h" |
#include "apropos_db.h" |
#include "apropos_db.h" |
#include "mandoc.h" |
#include "mandoc.h" |
|
#include "mandoc_aux.h" |
|
|
#define RESFREE(_x) \ |
#define RESFREE(_x) \ |
do { \ |
do { \ |
Line 554 single_search(struct rectree *tree, const struct opts |
|
Line 554 single_search(struct rectree *tree, const struct opts |
|
if (strcasecmp(opts->arch, r.arch)) |
if (strcasecmp(opts->arch, r.arch)) |
continue; |
continue; |
|
|
tree->node = rs = mandoc_realloc |
tree->node = rs = mandoc_reallocarray(rs, |
(rs, (tree->len + 1) * sizeof(struct res)); |
tree->len + 1, sizeof(struct res)); |
|
|
memcpy(&rs[tree->len], &r, sizeof(struct res)); |
memcpy(&rs[tree->len], &r, sizeof(struct res)); |
memset(&r, 0, sizeof(struct res)); |
memset(&r, 0, sizeof(struct res)); |