Module Name:    src
Committed By:   wiz
Date:           Tue Jun  3 14:42:41 UTC 2014

Modified Files:
        src/usr.sbin/makemandb: makemandb.c

Log Message:
Fix a bug that caused an error about a UNIQUE constraint violation.
Patch from Abhinav Upadhyay.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/makemandb/makemandb.c

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

Modified files:

Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.23 src/usr.sbin/makemandb/makemandb.c:1.24
--- src/usr.sbin/makemandb/makemandb.c:1.23	Sat May 24 21:01:58 2014
+++ src/usr.sbin/makemandb/makemandb.c	Tue Jun  3 14:42:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemandb.c,v 1.23 2014/05/24 21:01:58 wiz Exp $	*/
+/*	$NetBSD: makemandb.c,v 1.24 2014/06/03 14:42:41 wiz Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay <[email protected]>
  * Copyright (c) 2011 Kristaps Dzonsons <[email protected]>
@@ -17,7 +17,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.23 2014/05/24 21:01:58 wiz Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.24 2014/06/03 14:42:41 wiz Exp $");
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -1718,7 +1718,7 @@ insert_into_db(sqlite3 *db, mandb_rec *r
 
 	rc = sqlite3_step(stmt);
 	sqlite3_finalize(stmt);
-	if (rc == SQLITE_CONSTRAINT) {
+	if (rc == SQLITE_CONSTRAINT_UNIQUE) {
 		/* The *most* probable reason for reaching here is that
 		 * the UNIQUE contraint on the file column of the mandb_meta
 		 * table was violated.

Reply via email to