summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-06 20:15:08 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-06 20:33:54 +0200
commit057fbb58851f97cfcf4d90d5d3c539ac6f8ab13d (patch)
tree2b33e199d67782950db3d70457575cfe7049a0df /src/util.c
parented2d7a4465f682be651ae95df6a60816bf7dce31 (diff)
util: fix space calculation in get_process_cmdline()
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 8c22dbefa9..d1120c60a5 100644
--- a/src/util.c
+++ b/src/util.c
@@ -601,6 +601,7 @@ int get_process_cmdline(pid_t pid, size_t max_length, char **line) {
break;
*(k++) = ' ';
+ left--;
space = false;
}
@@ -608,6 +609,7 @@ int get_process_cmdline(pid_t pid, size_t max_length, char **line) {
break;
*(k++) = (char) c;
+ left--;
} else
space = true;
}