X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fshared%2Fmath_op.c;h=b08f8541047e3dc3b3d455f6474df9529716f10b;hb=372b53a05f545963ee37488149828312a47b3171;hp=313001351c8286f22360d824a2ead50c30e4c571;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/shared/math_op.c b/src/shared/math_op.c index 3130013..b08f854 100755 --- a/src/shared/math_op.c +++ b/src/shared/math_op.c @@ -1,11 +1,12 @@ -/* @(#) $Id: math_op.c,v 1.3 2009/06/24 18:53:08 dcid Exp $ */ +/* @(#) $Id: ./src/shared/math_op.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation * * License details at the LICENSE file included with OSSEC or @@ -24,14 +25,14 @@ int os_getprime(int val) { int i; int max_i; - + /* Value can't be even */ if((val % 2) == 0) { val++; } - - + + do { /* We just need to check odd numbers up until half