about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-10-27 18:21:02 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-10-27 18:21:02 +0200
commit3fd39feb4153cf73f26223918bc8145ee98a9a92 (patch)
tree591b1efa870c0b54664b62d896c0e4a02e2db438
parent93eee247caa059f67f7665dee3626e5171f5e793 (diff)
downloaddwm-3fd39feb4153cf73f26223918bc8145ee98a9a92.tar.gz
some sanity changes
-rw-r--r--dwm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/dwm.c b/dwm.c
index 72af32f..a4deccf 100644
--- a/dwm.c
+++ b/dwm.c
@@ -666,7 +666,7 @@ void
 expose(XEvent *e) {
 	XExposeEvent *ev = &e->xexpose;
 
-	if(ev->count == 0) {
+	if(0 == ev->count) {
 		if(barwin == ev->window)
 			drawbar();
 	}
@@ -780,7 +780,7 @@ gettextprop(Window w, Atom atom, char *text, unsigned int size) {
 	int n;
 	XTextProperty name;
 
-	if(!text || size == 0)
+	if(!text || 0 == size)
 		return False;
 	text[0] = '\0';
 	XGetTextProperty(dpy, w, &name, atom);
@@ -1398,7 +1398,7 @@ setmwfact(const char *arg) {
 	if(!(ISTILE))
 		return;
 	/* arg handling, manipulate mwfact */
-	if(arg == NULL)
+	if(NULL == arg)
 		mwfact = MWFACT;
 	else if(1 == sscanf(arg, "%lf", &delta)) {
 		if(arg[0] == '+' || arg[0] == '-')
@@ -1515,8 +1515,8 @@ spawn(const char *arg) {
 		return;
 	/* The double-fork construct avoids zombie processes and keeps the code
 	 * clean from stupid signal handlers. */
-	if(fork() == 0) {
-		if(fork() == 0) {
+	if(0 == fork()) {
+		if(0 == fork()) {
 			if(dpy)
 				close(ConnectionNumber(dpy));
 			setsid();
@@ -1576,7 +1576,7 @@ tile(void) {
 	nw = 0; /* gcc stupidity requires this */
 	for(i = 0, c = mc = nexttiled(clients); c; c = nexttiled(c->next), i++) {
 		c->ismax = False;
-		if(i == 0) { /* master */
+		if(0 == i) { /* master */
 			nw = mw - 2 * c->border;
 			nh = wah - 2 * c->border;
 		}
@@ -1836,7 +1836,7 @@ view(const char *arg) {
 
 	memcpy(prevtags, seltags, sizeof seltags);
 	for(i = 0; i < NTAGS; i++)
-		seltags[i] = arg == NULL;
+		seltags[i] = (NULL == arg);
 	seltags[idxoftag(arg)] = True;
 	arrange();
 }
195'>195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273