aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authoroga2008-04-15 20:24:41 +0000
committeroga2008-04-15 20:24:41 +0000
commitb31333397785733587b3bfe3adb27ff2761702b5 (patch)
treeb4fdd1360ef1add5766452793034ef73bec0ebc4 /util.c
parent137723ad08c9062a346b29d72b4b2ce55971c217 (diff)
downloadcwm-b31333397785733587b3bfe3adb27ff2761702b5.tar.gz
hit it with the knf stick.
Diffstat (limited to 'util.c')
-rw-r--r--util.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/util.c b/util.c
index 9497795..d8cd7fa 100644
--- a/util.c
+++ b/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));
}
-
-