fix some questionable pointer casts; gcc-3.4.x didn't
like this
This commit is contained in:
parent
1770aeb7d0
commit
5573193349
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: smb_conn.c,v 1.16 2004/05/28 09:38:13 itojun Exp $ */
|
/* $NetBSD: smb_conn.c,v 1.17 2004/06/24 16:45:47 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2001 Boris Popov
|
* Copyright (c) 2000-2001 Boris Popov
|
||||||
@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.16 2004/05/28 09:38:13 itojun Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.17 2004/06/24 16:45:47 drochner Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Connection engine.
|
* Connection engine.
|
||||||
@ -126,17 +126,19 @@ static int
|
|||||||
smb_sm_lookupint(struct smb_vcspec *vcspec, struct smb_sharespec *shspec,
|
smb_sm_lookupint(struct smb_vcspec *vcspec, struct smb_sharespec *shspec,
|
||||||
struct smb_cred *scred, struct smb_vc **vcpp)
|
struct smb_cred *scred, struct smb_vc **vcpp)
|
||||||
{
|
{
|
||||||
struct smb_vc *vcp;
|
struct smb_connobj *ocp;
|
||||||
int exact = 1;
|
int exact = 1;
|
||||||
int fail = 1;
|
int fail = 1;
|
||||||
|
|
||||||
vcspec->shspec = shspec;
|
vcspec->shspec = shspec;
|
||||||
SMBCO_FOREACH((struct smb_connobj*)vcp, &smb_vclist) {
|
SMBCO_FOREACH(ocp, &smb_vclist) {
|
||||||
|
struct smb_vc *vcp = (struct smb_vc *)ocp;
|
||||||
|
|
||||||
if (smb_vc_lock(vcp, LK_EXCLUSIVE) != 0)
|
if (smb_vc_lock(vcp, LK_EXCLUSIVE) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if ((vcp->obj.co_flags & SMBV_PRIVATE) ||
|
if ((ocp->co_flags & SMBV_PRIVATE) ||
|
||||||
!CONNADDREQ(vcp->vc_paddr, vcspec->sap) ||
|
!CONNADDREQ(vcp->vc_paddr, vcspec->sap) ||
|
||||||
strcmp(vcp->vc_username, vcspec->username) != 0)
|
strcmp(vcp->vc_username, vcspec->username) != 0)
|
||||||
break;
|
break;
|
||||||
@ -588,12 +590,14 @@ int
|
|||||||
smb_vc_lookupshare(struct smb_vc *vcp, struct smb_sharespec *dp,
|
smb_vc_lookupshare(struct smb_vc *vcp, struct smb_sharespec *dp,
|
||||||
struct smb_cred *scred, struct smb_share **sspp)
|
struct smb_cred *scred, struct smb_share **sspp)
|
||||||
{
|
{
|
||||||
|
struct smb_connobj *osp;
|
||||||
struct smb_share *ssp = NULL;
|
struct smb_share *ssp = NULL;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
*sspp = NULL;
|
*sspp = NULL;
|
||||||
dp->scred = scred;
|
dp->scred = scred;
|
||||||
SMBCO_FOREACH((struct smb_connobj*)ssp, VCTOCP(vcp)) {
|
SMBCO_FOREACH(osp, VCTOCP(vcp)) {
|
||||||
|
ssp = (struct smb_share *)osp;
|
||||||
error = smb_share_lock(ssp, LK_EXCLUSIVE);
|
error = smb_share_lock(ssp, LK_EXCLUSIVE);
|
||||||
if (error)
|
if (error)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user