diff options
author | lulf <lulf@FreeBSD.org> | 2008-11-20 19:51:06 +0000 |
---|---|---|
committer | lulf <lulf@FreeBSD.org> | 2008-11-20 19:51:06 +0000 |
commit | e73e056aab204cc6b4a512e8180bd407828b1193 (patch) | |
tree | 227b23df11cb860ec67eaa4e55689934390f2629 /contrib/csup/fattr.c | |
parent | afd3a2cc89a68cf88b617e760beb75e31a550437 (diff) | |
download | FreeBSD-src-e73e056aab204cc6b4a512e8180bd407828b1193.zip FreeBSD-src-e73e056aab204cc6b4a512e8180bd407828b1193.tar.gz |
- Refactor some parts of the code and increase code reuse.
- Fix a lot of style issues remaining and old debugging output.
- Update comments where needed.
Diffstat (limited to 'contrib/csup/fattr.c')
-rw-r--r-- | contrib/csup/fattr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/csup/fattr.c b/contrib/csup/fattr.c index 53df588..c8409b6 100644 --- a/contrib/csup/fattr.c +++ b/contrib/csup/fattr.c @@ -44,7 +44,7 @@ /* * Include the appropriate definition for the file attributes we support. * There are two different files: fattr_bsd.h for BSD-like systems that - * support the extended file flags ? la chflags() and fattr_posix.h for + * support the extended file flags a la chflags() and fattr_posix.h for * bare POSIX systems that don't. */ #ifdef HAVE_FFLAGS @@ -764,7 +764,8 @@ fattr_makenode(const struct fattr *fa, const char *path) return (error); } -int fattr_delete(const char *path) +int +fattr_delete(const char *path) { struct fattr *fa; int error; @@ -846,9 +847,8 @@ fattr_install(struct fattr *fa, const char *topath, const char *frompath) error = rmdir(topath); else error = unlink(topath); - if (error) { + if (error) goto bad; - } } } @@ -859,9 +859,8 @@ fattr_install(struct fattr *fa, const char *topath, const char *frompath) tv[1].tv_sec = fa->modtime; /* Modification time. */ tv[1].tv_usec = 0; error = utimes(frompath, tv); - if (error) { + if (error) goto bad; - } } if (mask & FA_OWNER || mask & FA_GROUP) { uid = -1; |