diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-01-19 14:16:51 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-01-19 14:16:51 +0100 |
commit | 002b46da8a4270b89003a28b4f5431d857cd0b33 (patch) | |
tree | f8471e2e238ac7a79a7eccfbfc1ac0742849bba6 /libdiskfs/dir-unlink.c | |
parent | 9bebcd38f42da289a3eaf9f473a9529f8d3c4664 (diff) | |
download | hurd-002b46da8a4270b89003a28b4f5431d857cd0b33.tar.gz hurd-002b46da8a4270b89003a28b4f5431d857cd0b33.tar.bz2 hurd-002b46da8a4270b89003a28b4f5431d857cd0b33.zip |
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.
Diffstat (limited to 'libdiskfs/dir-unlink.c')
-rw-r--r-- | libdiskfs/dir-unlink.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libdiskfs/dir-unlink.c b/libdiskfs/dir-unlink.c index f687a16e..cf02c227 100644 --- a/libdiskfs/dir-unlink.c +++ b/libdiskfs/dir-unlink.c @@ -27,7 +27,7 @@ diskfs_S_dir_unlink (struct protid *dircred, struct node *dnp; struct node *np; struct dirstat *ds = alloca (diskfs_dirstat_size); - error_t error; + error_t err; mach_port_t control = MACH_PORT_NULL; if (!dircred) @@ -39,14 +39,14 @@ diskfs_S_dir_unlink (struct protid *dircred, pthread_mutex_lock (&dnp->lock); - error = diskfs_lookup (dnp, name, REMOVE, &np, ds, dircred); - if (error == EAGAIN) - error = EPERM; /* 1003.1-1996 5.5.1.4 */ - if (error) + err = diskfs_lookup (dnp, name, REMOVE, &np, ds, dircred); + if (err == EAGAIN) + err = EPERM; /* 1003.1-1996 5.5.1.4 */ + if (err) { diskfs_drop_dirstat (dnp, ds); pthread_mutex_unlock (&dnp->lock); - return error; + return err; } /* This isn't the BSD behavior, but it is Posix compliant and saves @@ -62,14 +62,14 @@ diskfs_S_dir_unlink (struct protid *dircred, return EPERM; /* 1003.1-1996 5.5.1.4 */ } - error = diskfs_dirremove (dnp, np, name, ds); + err = diskfs_dirremove (dnp, np, name, ds); if (diskfs_synchronous) diskfs_node_update (dnp, 1); - if (error) + if (err) { diskfs_nput (np); pthread_mutex_unlock (&dnp->lock); - return error; + return err; } np->dn_stat.st_nlink--; @@ -94,5 +94,5 @@ diskfs_S_dir_unlink (struct protid *dircred, mach_port_deallocate (mach_task_self (), control); } - return error; + return err; } |