Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/examples/puffs/pgfs isempty: fix a query result type.
details: https://anonhg.NetBSD.org/src/rev/d0487a915084
branches: trunk
changeset: 770342:d0487a915084
user: yamt <yamt%NetBSD.org@localhost>
date: Thu Oct 13 14:40:06 2011 +0000
description:
isempty: fix a query result type.
diffstat:
share/examples/puffs/pgfs/pgfs_subs.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (41 lines):
diff -r ca3c88ecda06 -r d0487a915084 share/examples/puffs/pgfs/pgfs_subs.c
--- a/share/examples/puffs/pgfs/pgfs_subs.c Thu Oct 13 11:35:37 2011 +0000
+++ b/share/examples/puffs/pgfs/pgfs_subs.c Thu Oct 13 14:40:06 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pgfs_subs.c,v 1.2 2011/10/12 16:24:39 yamt Exp $ */
+/* $NetBSD: pgfs_subs.c,v 1.3 2011/10/13 14:40:06 yamt Exp $ */
/*-
* Copyright (c)2010,2011 YAMAMOTO Takashi,
@@ -46,7 +46,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: pgfs_subs.c,v 1.2 2011/10/12 16:24:39 yamt Exp $");
+__RCSID("$NetBSD: pgfs_subs.c,v 1.3 2011/10/13 14:40:06 yamt Exp $");
#endif /* not lint */
#include <assert.h>
@@ -906,10 +906,8 @@
int
isempty(struct Xconn *xc, fileid_t fileid, bool *emptyp)
{
- fileid_t dummy;
+ int32_t dummy;
static struct cmd *c;
- static const Oid types[] = { INT8OID, };
- struct fetchstatus s;
int error;
CREATECMD(c,
@@ -919,9 +917,7 @@
if (error != 0) {
return error;
}
- fetchinit(&s, xc);
- error = FETCHNEXT(&s, types, &dummy);
- fetchdone(&s);
+ error = simplefetch(xc, INT4OID, &dummy);
assert(error != 0 || dummy == 1);
if (error == ENOENT) {
*emptyp = true;
Home |
Main Index |
Thread Index |
Old Index