From 000ba0def6e1f9f2bb89aad53f7c72d9e0c0e41f Mon Sep 17 00:00:00 2001 Message-Id: <000ba0def6e1f9f2bb89aad53f7c72d9e0c0e41f.1717040384.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 8 Oct 2000 11:07:21 +0000 Subject: [PATCH] With no arguments, give an error rather than spewing a big table at the user. Organization: Straylight/Edgeware From: mdw --- crc-mktab.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crc-mktab.c b/crc-mktab.c index 887315b..def5361 100644 --- a/crc-mktab.c +++ b/crc-mktab.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: crc-mktab.c,v 1.1 2000/07/21 19:01:33 mdw Exp $ + * $Id: crc-mktab.c,v 1.2 2000/10/08 11:07:21 mdw Exp $ * * Build CRC tables * @@ -30,6 +30,10 @@ /*----- Revision history --------------------------------------------------* * * $Log: crc-mktab.c,v $ + * Revision 1.2 2000/10/08 11:07:21 mdw + * With no arguments, give an error rather than spewing a big table at the + * user. + * * Revision 1.1 2000/07/21 19:01:33 mdw * Generate the CRC table rather than hardcoding it. * @@ -231,11 +235,13 @@ int main(int argc, char *argv[]) poly = 0x1021; break; case 32: - case 0: poly = 0x04c11db7; flags |= f_reverse; bits = 32; break; + case 0: + die(EXIT_FAILURE, "no polynomial or bit width set"); + break; default: die(EXIT_FAILURE, "no standard polynomials for %u bits", bits); break; -- [mdw]