From 002b46da8a4270b89003a28b4f5431d857cd0b33 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 19 Jan 2014 14:16:51 +0100 Subject: Rename variables with the name "error" to "err". The canonical name for variables of the type error_t is err. There are, however, places where the variable is called error instead. This is unfortunate, as this shadows the error function. Rename such variables to err. For reference, this is accomplished using the following semantic patch: @@ expression E; @@ -error_t error = E; +error_t err = E; <... -error +err ...> @@ @@ -error_t error; +error_t err; <... -error +err ...> * libdiskfs/dir-link.c: Rename error to err. * libdiskfs/dir-unlink.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libdiskfs/file-get-transcntl.c: Likewise. * libdiskfs/file-set-trans.c: Likewise. * libdiskfs/fsys-getroot.c: Likewise. * libshouldbeinlibc/wire.c: Likewise. --- libdiskfs/file-get-transcntl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libdiskfs/file-get-transcntl.c') diff --git a/libdiskfs/file-get-transcntl.c b/libdiskfs/file-get-transcntl.c index c7fad91a..311d23ef 100644 --- a/libdiskfs/file-get-transcntl.c +++ b/libdiskfs/file-get-transcntl.c @@ -25,7 +25,7 @@ diskfs_S_file_get_translator_cntl (struct protid *cred, mach_msg_type_name_t *ctltype) { struct node *np; - error_t error; + error_t err; if (!cred) return EOPNOTSUPP; @@ -34,15 +34,15 @@ diskfs_S_file_get_translator_cntl (struct protid *cred, pthread_mutex_lock (&np->lock); - error = fshelp_isowner (&np->dn_stat, cred->user); - if (!error) - error = fshelp_fetch_control (&np->transbox, ctl); - if (!error && *ctl == MACH_PORT_NULL) - error = ENXIO; - if (!error) + err = fshelp_isowner (&np->dn_stat, cred->user); + if (!err) + err = fshelp_fetch_control (&np->transbox, ctl); + if (!err && *ctl == MACH_PORT_NULL) + err = ENXIO; + if (!err) *ctltype = MACH_MSG_TYPE_MOVE_SEND; pthread_mutex_unlock (&np->lock); - return error; + return err; } -- cgit v1.2.3