From: Zooko O'Whielacronx Date: Wed, 31 Jan 2007 23:53:16 +0000 (-0700) Subject: pyfec: loosen preconditions -- you can have up to 256 total shares, not up to 255... X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~140 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/priv.html?a=commitdiff_plain;h=9c50c156dd624b41cb7cd07fe8eef847e87484ac;p=tahoe-lafs%2Ftahoe-lafs.git pyfec: loosen preconditions -- you can have up to 256 total shares, not up to 255 total shares --- diff --git a/pyfec/fec/_fecmodule.c b/pyfec/fec/_fecmodule.c index d5977530..e3d68c59 100644 --- a/pyfec/fec/_fecmodule.c +++ b/pyfec/fec/_fecmodule.c @@ -110,8 +110,8 @@ Encoder_init(Encoder *self, PyObject *args, PyObject *kwdict) { py_raise_fec_error("Precondition violation: second argument is required to be greater than or equal to 1, but it was %d", self->mm); return -1; } - if (self->mm > 256) { - py_raise_fec_error("Precondition violation: second argument is required to be less than or equal to 256, but it was %d", self->mm); + if (self->mm > 255) { + py_raise_fec_error("Precondition violation: second argument is required to be less than or equal to 255, but it was %d", self->mm); return -1; } if (self->kk > self->mm) { @@ -363,8 +363,8 @@ Decoder_init(Encoder *self, PyObject *args, PyObject *kwdict) { py_raise_fec_error("Precondition violation: second argument is required to be greater than or equal to 1, but it was %d", self->mm); return -1; } - if (self->mm > 256) { - py_raise_fec_error("Precondition violation: second argument is required to be less than or equal to 256, but it was %d", self->mm); + if (self->mm > 255) { + py_raise_fec_error("Precondition violation: second argument is required to be less than or equal to 255, but it was %d", self->mm); return -1; } if (self->kk > self->mm) {