From: mdw Date: Sun, 8 Oct 2000 11:07:21 +0000 (+0000) Subject: With no arguments, give an error rather than spewing a big table at the X-Git-Tag: 2.0.4~145 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/commitdiff_plain/000ba0def6e1f9f2bb89aad53f7c72d9e0c0e41f?hp=2a36652160047f489a62cc6eed23a9bfe0631b2f With no arguments, give an error rather than spewing a big table at the user. --- 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;