summaryrefslogtreecommitdiff
path: root/app/cwm/util.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-04-15 20:24:42 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-04-15 20:24:42 +0000
commit6c2511bac22d67337971a08bada1d79809d39d14 (patch)
treeb6a83c21659c0f71e94e28c27fc80c7349584d5b /app/cwm/util.c
parentfe4284d4c2deef28f27802c5fcefa2ba8e1a699b (diff)
hit it with the knf stick.
Diffstat (limited to 'app/cwm/util.c')
-rw-r--r--app/cwm/util.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/app/cwm/util.c b/app/cwm/util.c
index 94977954a..d8cd7fa24 100644
--- a/app/cwm/util.c
+++ b/app/cwm/util.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: util.c,v 1.5 2008/02/20 13:00:18 oga Exp $
+ * $Id: util.c,v 1.6 2008/04/15 20:24:41 oga Exp $
*/
#include "headers.h"
@@ -65,28 +65,30 @@ exec_wm(char *argstr)
warn(args[0]);
}
-int dirent_isdir(char *filename) {
- struct stat buffer;
- int return_value;
+int
+dirent_isdir(char *filename)
+{
+ struct stat buffer;
+ int return_value;
- return_value = stat(filename, &buffer);
+ return_value = stat(filename, &buffer);
- if(return_value == -1)
- return 0;
- else
- return S_ISDIR(buffer.st_mode);
+ if (return_value == -1)
+ return (0);
+ else
+ return (S_ISDIR(buffer.st_mode));
}
-int dirent_islink(char *filename) {
- struct stat buffer;
- int return_value;
+int
+dirent_islink(char *filename)
+{
+ struct stat buffer;
+ int return_value;
- return_value = lstat(filename, &buffer);
+ return_value = lstat(filename, &buffer);
- if(return_value == -1)
- return 0;
- else
- return S_ISLNK(buffer.st_mode);
+ if (return_value == -1)
+ return (0);
+ else
+ return (S_ISLNK(buffer.st_mode));
}
-
-