]> andersk Git - gssapi-openssh.git/blobdiff - openssh/moduli.c
merged OpenSSH 4.4p1 to trunk
[gssapi-openssh.git] / openssh / moduli.c
index d53806ea6bda0294688a19d49c1c59d6ece06978..e18929badd85ab345e21adf686883226c0973e58 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: moduli.c,v 1.12 2005/07/17 07:17:55 djm Exp $ */
+/* $OpenBSD: moduli.c,v 1.18 2006/08/03 03:34:42 deraadt Exp $ */
 /*
  * Copyright 1994 Phil Karn <karn@qualcomm.com>
  * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
  */
 
 #include "includes.h"
-#include "xmalloc.h"
-#include "log.h"
+
+#include <sys/types.h>
 
 #include <openssl/bn.h>
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <time.h>
+
+#include "xmalloc.h"
+#include "log.h"
+
 /*
  * File output defines
  */
@@ -301,21 +310,10 @@ gen_candidates(FILE *out, u_int32_t memory, u_int32_t power, BIGNUM *start)
                largewords = (largememory << SHIFT_MEGAWORD);
        }
 
-       TinySieve = calloc(tinywords, sizeof(u_int32_t));
-       if (TinySieve == NULL) {
-               error("Insufficient memory for tiny sieve: need %u bytes",
-                   tinywords << SHIFT_BYTE);
-               exit(1);
-       }
+       TinySieve = xcalloc(tinywords, sizeof(u_int32_t));
        tinybits = tinywords << SHIFT_WORD;
 
-       SmallSieve = calloc(smallwords, sizeof(u_int32_t));
-       if (SmallSieve == NULL) {
-               error("Insufficient memory for small sieve: need %u bytes",
-                   smallwords << SHIFT_BYTE);
-               xfree(TinySieve);
-               exit(1);
-       }
+       SmallSieve = xcalloc(smallwords, sizeof(u_int32_t));
        smallbits = smallwords << SHIFT_WORD;
 
        /*
This page took 0.109718 seconds and 4 git commands to generate.