Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makemandb Fix a bug that caused an error about a UN...



details:   https://anonhg.NetBSD.org/src/rev/0b3f56e60114
branches:  trunk
changeset: 796432:0b3f56e60114
user:      wiz <wiz%NetBSD.org@localhost>
date:      Tue Jun 03 14:42:41 2014 +0000

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

diffstat:

 usr.sbin/makemandb/makemandb.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6a550813577a -r 0b3f56e60114 usr.sbin/makemandb/makemandb.c
--- a/usr.sbin/makemandb/makemandb.c    Tue Jun 03 13:53:28 2014 +0000
+++ b/usr.sbin/makemandb/makemandb.c    Tue Jun 03 14:42:41 2014 +0000
@@ -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 <er.abhinav.upadhyay%gmail.com@localhost>
  * Copyright (c) 2011 Kristaps Dzonsons <kristaps%bsd.lv@localhost>
@@ -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 @@
 
        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.



Home | Main Index | Thread Index | Old Index