diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-05-14 23:39:56 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-05-14 23:39:56 +0200 |
commit | 3a570bb6793264f8d30e7c3c20951b9631450fd0 (patch) | |
tree | f4630a6e716ded7ca202a155e4be3e6a7eec083a /util.c | |
parent | 5fde2a2465dff28cdd3f753bd1d18656ae4b5660 (diff) | |
parent | 91c05f94032debb645c14c76c9911ea5cfba5d3c (diff) | |
download | cwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.tar.gz cwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.tar.xz cwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.zip |
cvsimport
* refs/heads/master: Fixed memory leak in xu_get_strprop. Prevent out of boundary write with configuration files in which too many quoted arguments are stored for other window managers. Allow configuring a percentage window size of the master window during htile/vtile actions. From Uwe Werler, with a few manpage tweaks. zap stray tabs Instead of using _NET_ACTIVE_WINDOW on restart, use the pointer location to determine what client to set active. Reduces a round trip for every window. Add support for SIGINT/SIGTERM. Simplify conditional construct. Trim event_mask to those that the root window actually needs. No need to lookup current client early; move to right before it is needed. Recommit 1.259, but now with TAILQ_FOREACH_SAFE. Revert previous. Causes a crash as reported by Tom Murphy. Simplify list markup. Plug two memory leaks. Also get rid of a variable that is no longer necessary. Remove ColormaskChange from event-mask since there's no event handler. Unrelated style fixes, consistency changes and sorting, appropriate dosage/removal of wrappers, simplification of name queue, client cycle joins other kb/mb bound functions.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util.c b/util.c index 781308f..97b5641 100644 --- a/util.c +++ b/util.c @@ -53,7 +53,7 @@ u_exec(char *argstr) { #define MAXARGLEN 20 char *args[MAXARGLEN], **ap = args; - char **end = &args[MAXARGLEN - 1], *tmp; + char **end = &args[MAXARGLEN - 2], *tmp; char *s = argstr; while (ap < end && (*ap = strsep(&argstr, " \t")) != NULL) { @@ -92,12 +92,12 @@ u_argv(char * const *argv) char *p; if (argv == 0) - return(NULL); + return NULL; for (i = 0; argv[i]; i++) siz += strlen(argv[i]) + 1; if (siz == 0) - return(NULL); + return NULL; p = xmalloc(siz); strlcpy(p, argv[0], siz); @@ -105,7 +105,7 @@ u_argv(char * const *argv) strlcat(p, " ", siz); strlcat(p, argv[i], siz); } - return(p); + return p; } static void |