aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorokan2011-06-24 05:40:09 +0000
committerokan2011-06-24 05:40:09 +0000
commit042dd52d9a25ab335d4aad404694a0bef8b93ebd (patch)
tree05a25c2d87b03158e2b7eaf645ac0eb6d3c7e0e3
parent9cc5f84c650971dd1e6791e22c983221ba4aaf43 (diff)
downloadcwm-042dd52d9a25ab335d4aad404694a0bef8b93ebd.tar.gz
alter a few function returns and prototypes; found by lint.
ok oga@
Diffstat (limited to '')
-rw-r--r--calmwm.h8
-rw-r--r--client.c21
-rw-r--r--conf.c3
-rw-r--r--util.c7
4 files changed, 14 insertions, 25 deletions
diff --git a/calmwm.h b/calmwm.h
index ac577a4..381106d 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -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.
*
- * $OpenBSD: calmwm.h,v 1.127 2011/06/24 05:30:42 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.128 2011/06/24 05:40:09 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -307,8 +307,8 @@ __dead void usage(void);
void client_applysizehints(struct client_ctx *);
struct client_ctx *client_current(void);
-struct client_ctx *client_cycle(struct screen_ctx *, int);
-int client_delete(struct client_ctx *);
+void client_cycle(struct screen_ctx *, int);
+void client_delete(struct client_ctx *);
void client_draw_border(struct client_ctx *);
struct client_ctx *client_find(Window);
void client_freeze(struct client_ctx *);
@@ -463,7 +463,7 @@ void xu_setstate(struct client_ctx *, int);
void xu_setwmname(struct screen_ctx *);
void u_exec(char *);
-int u_spawn(char *);
+void u_spawn(char *);
void *xcalloc(size_t, size_t);
void xfree(void *);
diff --git a/client.c b/client.c
index 8f24b57..e7307cd 100644
--- a/client.c
+++ b/client.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.
*
- * $OpenBSD: client.c,v 1.82 2011/05/11 13:53:51 okan Exp $
+ * $OpenBSD: client.c,v 1.83 2011/06/24 05:40:09 okan Exp $
*/
#include <sys/param.h>
@@ -137,7 +137,7 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
return (cc);
}
-int
+void
client_delete(struct client_ctx *cc)
{
struct screen_ctx *sc = cc->sc;
@@ -189,8 +189,6 @@ client_delete(struct client_ctx *cc)
client_freehints(cc);
xfree(cc);
-
- return (0);
}
void
@@ -550,9 +548,8 @@ client_setname(struct client_ctx *cc)
char *newname;
if (!xu_getstrprop(cc->win, _NET_WM_NAME, &newname))
- xu_getstrprop(cc->win, XA_WM_NAME, &newname);
- if (newname == NULL)
- newname = emptystring;
+ if (!xu_getstrprop(cc->win, XA_WM_NAME, &newname))
+ newname = emptystring;
TAILQ_FOREACH(wn, &cc->nameq, entry)
if (strcmp(wn->name, newname) == 0) {
@@ -580,11 +577,9 @@ match:
xfree(wn);
cc->nameqlen--;
}
-
- return;
}
-struct client_ctx *
+void
client_cycle(struct screen_ctx *sc, int reverse)
{
struct client_ctx *oldcc, *newcc;
@@ -594,7 +589,7 @@ client_cycle(struct screen_ctx *sc, int reverse)
/* If no windows then you cant cycle */
if (TAILQ_EMPTY(&sc->mruq))
- return (NULL);
+ return;
if (oldcc == NULL)
oldcc = (reverse ? TAILQ_LAST(&sc->mruq, cycle_entry_q) :
@@ -614,7 +609,7 @@ client_cycle(struct screen_ctx *sc, int reverse)
/* Is oldcc the only non-hidden window? */
if (newcc == oldcc) {
if (again)
- return (NULL); /* No windows visible. */
+ return; /* No windows visible. */
break;
}
@@ -624,8 +619,6 @@ client_cycle(struct screen_ctx *sc, int reverse)
sc->altpersist = 1;
client_ptrsave(oldcc);
client_ptrwarp(newcc);
-
- return (newcc);
}
static struct client_ctx *
diff --git a/conf.c b/conf.c
index fac1ef3..62943a6 100644
--- a/conf.c
+++ b/conf.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.
*
- * $OpenBSD: conf.c,v 1.80 2011/06/24 05:30:42 okan Exp $
+ * $OpenBSD: conf.c,v 1.81 2011/06/24 05:40:09 okan Exp $
*/
#include <sys/param.h>
@@ -521,7 +521,6 @@ conf_bindname(struct conf *c, char *name, char *binding)
current_binding->flags = 0;
conf_grab(c, current_binding);
TAILQ_INSERT_TAIL(&c->keybindingq, current_binding, entry);
- return;
}
static void
diff --git a/util.c b/util.c
index 6993984..aa15900 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.
*
- * $OpenBSD: util.c,v 1.13 2011/05/11 13:53:51 okan Exp $
+ * $OpenBSD: util.c,v 1.14 2011/06/24 05:40:09 okan Exp $
*/
#include <sys/param.h>
@@ -32,7 +32,7 @@
#define MAXARGLEN 20
-int
+void
u_spawn(char *argstr)
{
switch (fork()) {
@@ -42,12 +42,9 @@ u_spawn(char *argstr)
break;
case -1:
warn("fork");
- return (-1);
default:
break;
}
-
- return (0);
}
void