]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ipfilter/lib/findword.c
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ipfilter / lib / findword.c
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 *findword(words, name)
13         wordtab_t *words;
14         char *name;
15 {
16         wordtab_t *w;
17
18         for (w = words; w->w_word != NULL; w++)
19                 if (!strcmp(name, w->w_word))
20                         break;
21         if (w->w_word == NULL)
22                 return NULL;
23
24         return w;
25 }