some sanity changes 3fd39feb
Anselm R. Garbe · 2007-10-27 18:21 1 file(s) · +7 −7
dwm.c +7 −7
666 666
expose(XEvent *e) {
667 667
	XExposeEvent *ev = &e->xexpose;
668 668
669 -
	if(ev->count == 0) {
669 +
	if(0 == ev->count) {
670 670
		if(barwin == ev->window)
671 671
			drawbar();
672 672
	}
780 780
	int n;
781 781
	XTextProperty name;
782 782
783 -
	if(!text || size == 0)
783 +
	if(!text || 0 == size)
784 784
		return False;
785 785
	text[0] = '\0';
786 786
	XGetTextProperty(dpy, w, &name, atom);
1398 1398
	if(!(ISTILE))
1399 1399
		return;
1400 1400
	/* arg handling, manipulate mwfact */
1401 -
	if(arg == NULL)
1401 +
	if(NULL == arg)
1402 1402
		mwfact = MWFACT;
1403 1403
	else if(1 == sscanf(arg, "%lf", &delta)) {
1404 1404
		if(arg[0] == '+' || arg[0] == '-')
1515 1515
		return;
1516 1516
	/* The double-fork construct avoids zombie processes and keeps the code
1517 1517
	 * clean from stupid signal handlers. */
1518 -
	if(fork() == 0) {
1519 -
		if(fork() == 0) {
1518 +
	if(0 == fork()) {
1519 +
		if(0 == fork()) {
1520 1520
			if(dpy)
1521 1521
				close(ConnectionNumber(dpy));
1522 1522
			setsid();
1576 1576
	nw = 0; /* gcc stupidity requires this */
1577 1577
	for(i = 0, c = mc = nexttiled(clients); c; c = nexttiled(c->next), i++) {
1578 1578
		c->ismax = False;
1579 -
		if(i == 0) { /* master */
1579 +
		if(0 == i) { /* master */
1580 1580
			nw = mw - 2 * c->border;
1581 1581
			nh = wah - 2 * c->border;
1582 1582
		}
1836 1836
1837 1837
	memcpy(prevtags, seltags, sizeof seltags);
1838 1838
	for(i = 0; i < NTAGS; i++)
1839 -
		seltags[i] = arg == NULL;
1839 +
		seltags[i] = (NULL == arg);
1840 1840
	seltags[idxoftag(arg)] = True;
1841 1841
	arrange();
1842 1842
}