xref: /freebsd/sbin/ipf/libipf/findword.c (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1 /*
2  * Copyright (C) 2012 by Darren Reed.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  * $Id: findword.c,v 1.3.4.1 2012/07/22 08:04:24 darren_r Exp $
7  */
8 
9 #include "ipf.h"
10 
11 
12 wordtab_t *
13 findword(wordtab_t *words, char *name)
14 {
15 	wordtab_t *w;
16 
17 	for (w = words; w->w_word != NULL; w++)
18 		if (!strcmp(name, w->w_word))
19 			break;
20 	if (w->w_word == NULL)
21 		return (NULL);
22 
23 	return (w);
24 }
25