Module Name: othersrc
Committed By: agc
Date: Mon Feb 20 06:54:01 UTC 2012
Modified Files:
othersrc/crypto/external/bsd/ssss/dist/src/libssss: secsplit.c
Log Message:
minor cosmetic changes to make this more readable - no functional change
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
othersrc/crypto/external/bsd/ssss/dist/src/libssss/secsplit.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/crypto/external/bsd/ssss/dist/src/libssss/secsplit.c
diff -u othersrc/crypto/external/bsd/ssss/dist/src/libssss/secsplit.c:1.4 othersrc/crypto/external/bsd/ssss/dist/src/libssss/secsplit.c:1.5
--- othersrc/crypto/external/bsd/ssss/dist/src/libssss/secsplit.c:1.4 Sat Feb 18 02:17:42 2012
+++ othersrc/crypto/external/bsd/ssss/dist/src/libssss/secsplit.c Mon Feb 20 06:54:01 2012
@@ -365,9 +365,7 @@ interpolate(int *x, uint32_t *y, unsigne
unsigned i;
unsigned j;
- for (i = 0; i < n; i++) {
- alpha[i] = y[i];
- }
+ (void) memcpy(alpha, y, n * sizeof(alpha[0]));
for (i = 1; i < n; i++) {
for (j = n - 1; j >= i; j--) {
if (alpha[j] > alpha[j - 1]) {
@@ -381,11 +379,7 @@ interpolate(int *x, uint32_t *y, unsigne
}
product = alpha[n - 1];
for (i = n - 2; (int)i >= 0; i--) {
- if (x[i] > 0) {
- product *= 0 - x[i] + LARGEST_PRIME;
- } else {
- product *= 0 - x[i];
- }
+ product *= -x[i] + ((x[i] > 0) ? LARGEST_PRIME : 0);
product += alpha[i];
product %= LARGEST_PRIME;
}
@@ -447,7 +441,7 @@ get_assemble(s4_t *s4, unsigned nin, thr
}
/*
- * Given a set of nin file descriptors, assemble them to generate the
+ * Given a set of nin input descriptors, assemble them to generate the
* original file. This is the main routine for the assembly case.
*/
static int