diff options
author | Volker Lendecke <vl@samba.org> | 2010-07-04 18:12:24 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-07-05 11:06:25 +0200 |
commit | 33242471e5ad974bf96d2340c9aa8d56941795e7 (patch) | |
tree | e7b6dc5025177ae91a88b845691ce6db0c6ad6c8 | |
parent | faef081e967f657fb7043de683131f230f5e22c4 (diff) | |
download | samba-33242471e5ad974bf96d2340c9aa8d56941795e7.tar.gz samba-33242471e5ad974bf96d2340c9aa8d56941795e7.tar.bz2 samba-33242471e5ad974bf96d2340c9aa8d56941795e7.zip |
s3: Remove NULL checks from claim_connection()
Nowadays this is only called from make_connection_snum() where we always
provide a connection_struct.
-rw-r--r-- | source3/smbd/connection.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index e2d15f1ccd..1b41931279 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -139,13 +139,11 @@ bool claim_connection(connection_struct *conn, const char *name) ZERO_STRUCT(crec); crec.magic = 0x280267; crec.pid = procid_self(); - crec.cnum = conn?conn->cnum:-1; - if (conn) { - crec.uid = conn->server_info->utok.uid; - crec.gid = conn->server_info->utok.gid; - strlcpy(crec.servicename, lp_servicename(SNUM(conn)), - sizeof(crec.servicename)); - } + crec.cnum = conn->cnum; + crec.uid = conn->server_info->utok.uid; + crec.gid = conn->server_info->utok.gid; + strlcpy(crec.servicename, lp_servicename(SNUM(conn)), + sizeof(crec.servicename)); crec.start = time(NULL); strlcpy(crec.machine,get_remote_machine_name(),sizeof(crec.machine)); |