1 /* @(#) $Id: math_op.c,v 1.3 2009/06/24 18:53:08 dcid Exp $ */
3 /* Copyright (C) 2009 Trend Micro Inc.
6 * This program is a free software; you can redistribute it
7 * and/or modify it under the terms of the GNU General Public
8 * License (version 3) as published by the FSF - Free Software
11 * License details at the LICENSE file included with OSSEC or
12 * online at: http://www.ossec.net/en/licensing.html
20 * Get the first available prime after the provided value.
23 int os_getprime(int val)
28 /* Value can't be even */
37 /* We just need to check odd numbers up until half
38 * the size of the provided value.