#include <sys/wait.h>
#include <unistd.h>
-/* static */
-
-static void
-bad_malloc(unsigned int size)
-{
- eprint("fatal: could not malloc() %u bytes\n", size);
-}
-
/* extern */
void *
void *res = calloc(1, size);
if(!res)
- bad_malloc(size);
+ eprint("fatal: could not malloc() %u bytes\n", size);
return res;
}
{
void *res = realloc(ptr, size);
if(!res)
- bad_malloc(size);
+ eprint("fatal: could not malloc() %u bytes\n", size);
return res;
}
if(dpy)
close(ConnectionNumber(dpy));
setsid();
- execl(shell, shell, "-c", arg->cmd, NULL);
+ execl(shell, shell, "-c", arg->cmd, (char *)NULL);
fprintf(stderr, "dwm: execl '%s -c %s'", shell, arg->cmd);
perror(" failed");
}