mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Sprinkle __func__ in appropriate error messages.
This commit is contained in:
parent
ffd60b3cab
commit
eb43101591
4
conf.c
4
conf.c
@ -138,7 +138,7 @@ conf_screen(struct screen_ctx *sc)
|
||||
if (sc->xftfont == NULL) {
|
||||
sc->xftfont = XftFontOpenName(X_Dpy, sc->which, Conf.font);
|
||||
if (sc->xftfont == NULL)
|
||||
errx(1, "XftFontOpenName: %s", Conf.font);
|
||||
errx(1, "%s: XftFontOpenName: %s", __func__, Conf.font);
|
||||
}
|
||||
|
||||
for (i = 0; i < nitems(color_binds); i++) {
|
||||
@ -169,7 +169,7 @@ conf_screen(struct screen_ctx *sc)
|
||||
|
||||
sc->menu.xftdraw = XftDrawCreate(X_Dpy, sc->menu.win, visual, colormap);
|
||||
if (sc->menu.xftdraw == NULL)
|
||||
errx(1, "XftDrawCreate");
|
||||
errx(1, "%s: XftDrawCreate", __func__);
|
||||
|
||||
conf_grab_kbd(sc->rootwin);
|
||||
}
|
||||
|
6
group.c
6
group.c
@ -155,7 +155,7 @@ group_movetogroup(struct client_ctx *cc, int idx)
|
||||
struct group_ctx *gc;
|
||||
|
||||
if (idx < 0 || idx >= Conf.ngroups)
|
||||
errx(1, "group_movetogroup: index out of range (%d)", idx);
|
||||
errx(1, "%s: index out of range (%d)", __func__, idx);
|
||||
|
||||
TAILQ_FOREACH(gc, &sc->groupq, entry) {
|
||||
if (gc->num == idx)
|
||||
@ -223,7 +223,7 @@ group_hidetoggle(struct screen_ctx *sc, int idx)
|
||||
struct group_ctx *gc;
|
||||
|
||||
if (idx < 0 || idx >= Conf.ngroups)
|
||||
errx(1, "group_hidetoggle: index out of range (%d)", idx);
|
||||
errx(1, "%s: index out of range (%d)", __func__, idx);
|
||||
|
||||
TAILQ_FOREACH(gc, &sc->groupq, entry) {
|
||||
if (gc->num == idx)
|
||||
@ -246,7 +246,7 @@ group_only(struct screen_ctx *sc, int idx)
|
||||
struct group_ctx *gc;
|
||||
|
||||
if (idx < 0 || idx >= Conf.ngroups)
|
||||
errx(1, "group_only: index out of range (%d)", idx);
|
||||
errx(1, "%s: index out of range (%d)", __func__, idx);
|
||||
|
||||
TAILQ_FOREACH(gc, &sc->groupq, entry) {
|
||||
if (gc->num == idx)
|
||||
|
6
kbfunc.c
6
kbfunc.c
@ -405,7 +405,7 @@ kbfunc_menu_exec(void *ctx, union arg *arg, enum xev xev)
|
||||
label = "wm";
|
||||
break;
|
||||
default:
|
||||
errx(1, "kbfunc_menu_exec: invalid cmd %d", cmd);
|
||||
errx(1, "%s: invalid cmd %d", __func__, cmd);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
@ -456,7 +456,7 @@ kbfunc_menu_exec(void *ctx, union arg *arg, enum xev xev)
|
||||
Conf.wm_argv = xstrdup(mi->text);
|
||||
break;
|
||||
default:
|
||||
errx(1, "kb_func: egad, cmd changed value!");
|
||||
errx(1, "%s: egad, cmd changed value!", __func__);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
@ -487,7 +487,7 @@ kbfunc_menu_ssh(void *ctx, union arg *arg, enum xev xev)
|
||||
TAILQ_INIT(&menuq);
|
||||
|
||||
if ((fp = fopen(Conf.known_hosts, "r")) == NULL) {
|
||||
warn("kbfunc_menu_ssh: %s", Conf.known_hosts);
|
||||
warn("%s: %s", __func__, Conf.known_hosts);
|
||||
goto menu;
|
||||
}
|
||||
|
||||
|
2
screen.c
2
screen.c
@ -101,7 +101,7 @@ screen_find(Window win)
|
||||
if (sc->rootwin == win)
|
||||
return(sc);
|
||||
}
|
||||
warnx("screen_find failure win 0x%lu\n", win);
|
||||
warnx("%s: failure win 0x%lu\n", __func__, win);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user