Module Name:    othersrc
Committed By:   agc
Date:           Wed Mar  5 04:56:00 UTC 2014

Modified Files:
        othersrc/external/bsd/multigest/dist: multigest.c multigest.h

Log Message:
multigest - minor cosmetic changes

bump version number to 20140304


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 othersrc/external/bsd/multigest/dist/multigest.c
cvs rdiff -u -r1.7 -r1.8 othersrc/external/bsd/multigest/dist/multigest.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/multigest/dist/multigest.c
diff -u othersrc/external/bsd/multigest/dist/multigest.c:1.8 othersrc/external/bsd/multigest/dist/multigest.c:1.9
--- othersrc/external/bsd/multigest/dist/multigest.c:1.8	Tue Mar  4 02:12:58 2014
+++ othersrc/external/bsd/multigest/dist/multigest.c	Wed Mar  5 04:56:00 2014
@@ -436,12 +436,17 @@ multigest_init(multigest_t *multigest, c
 		memset(multigest, 0x0, sizeof(*multigest));
 		multigest->type = strdup(algname);
 		for (i = 0, d = multigest->digs, ctxoff = 0 ;  *algname ; d++, i++) {
-			if (i >= __arraycount(multigest->digs) ||
-			    (alg = findalg(algname)) == NULL) {
+			if (i >= __arraycount(multigest->digs)) {
+				fprintf(stderr, "too many digest types %u\n", i);
+				break;
+			}
+			if ((alg = findalg(algname)) == NULL) {
+				fprintf(stderr, "no such algorithm '%.10s'\n", algname);
 				break;
 			}
 			if (ctxoff + alg->ctxsize >= multigest->ctxsize) {
 				if ((newv = realloc(multigest->ctx, multigest->ctxsize + 4096)) == NULL) {
+					fprintf(stderr, "multigest_init: allocation issues\n");
 					return 0;
 				}
 				multigest->ctx = newv;
@@ -463,6 +468,7 @@ multigest_init(multigest_t *multigest, c
 		}
 		return 1;
 	}
+	fprintf(stderr, "!multigest || !algname\n");
 	return 0;
 }
 
@@ -599,6 +605,7 @@ multigest_algs_rawsize(const char *alg)
 
 	memset(&m, 0x0, sizeof(m));
 	if (!multigest_init(&m, alg)) {
+		fprintf(stderr, "multigest_init: failed\n");
 		return 0;
 	}
 	size = multigest_get_rawsize(&m);

Index: othersrc/external/bsd/multigest/dist/multigest.h
diff -u othersrc/external/bsd/multigest/dist/multigest.h:1.7 othersrc/external/bsd/multigest/dist/multigest.h:1.8
--- othersrc/external/bsd/multigest/dist/multigest.h:1.7	Tue Mar  4 02:12:58 2014
+++ othersrc/external/bsd/multigest/dist/multigest.h	Wed Mar  5 04:56:00 2014
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2013 Alistair Crooks <a...@netbsd.org>
+ * Copyright (c) 2014 Alistair Crooks <a...@netbsd.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef MULTIGEST_H_
-#define MULTIGEST_H_	20130813
+#define MULTIGEST_H_	20140304
 
 #include <sys/types.h>
 

Reply via email to