summary refs log tree commit diff
path: root/util.c
diff options
context:
space:
mode:
authoroga <oga>2008-04-15 20:24:41 +0000
committeroga <oga>2008-04-15 20:24:41 +0000
commit75182c6d9c3ce832401eea8822ca599513dc8505 (patch)
tree7928dfedc3b060e999c48bd80c9e529f462567d1 /util.c
parent3a94c57afc6067c60b639944ef2042b0d73fb47e (diff)
downloadcwm-75182c6d9c3ce832401eea8822ca599513dc8505.tar.gz
cwm-75182c6d9c3ce832401eea8822ca599513dc8505.tar.xz
cwm-75182c6d9c3ce832401eea8822ca599513dc8505.zip
hit it with the knf stick.
Diffstat (limited to 'util.c')
-rw-r--r--util.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/util.c b/util.c
index 792129d..fdca4af 100644
--- a/util.c
+++ b/util.c
@@ -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));
 }
-
-