chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a36652
)
With no arguments, give an error rather than spewing a big table at the
author
mdw
<mdw>
Sun, 8 Oct 2000 11:07:21 +0000
(11:07 +0000)
committer
mdw
<mdw>
Sun, 8 Oct 2000 11:07:21 +0000
(11:07 +0000)
user.
crc-mktab.c
patch
|
blob
|
blame
|
history
diff --git
a/crc-mktab.c
b/crc-mktab.c
index 887315b67f7355a47503afdb821627b66f987237..def53613df0b431b691bf9a45d0e1408e2de8586 100644
(file)
--- a/
crc-mktab.c
+++ b/
crc-mktab.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-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
*
*
* Build CRC tables
*
@@
-30,6
+30,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: crc-mktab.c,v $
/*----- 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.
*
* 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:
poly = 0x1021;
break;
case 32:
- case 0:
poly = 0x04c11db7;
flags |= f_reverse;
bits = 32;
break;
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;
default:
die(EXIT_FAILURE, "no standard polynomials for %u bits", bits);
break;