aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-06-28 01:54:01 -0500
committerRob Landley <rob@landley.net>2016-06-28 01:54:01 -0500
commit63cbc6824da4f6b434e4aad9e63aa32a9a9a489d (patch)
tree27949967a481dc993ac0787b7a50b1bfbe5e9325 /toys/posix
parentcc1bc502de943356b360225692bb9b9818b0e63d (diff)
downloadtoybox-63cbc6824da4f6b434e4aad9e63aa32a9a9a489d.tar.gz
Fix a "may be used uninitialized".
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index 665fbdd4..72b56cb5 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -565,7 +565,7 @@ static void show_ps(struct carveup *tb)
// fields that can naturally be shorter
abslen = abs(field->len);
sign = field->len<0 ? -1 : 1;
- if (field->which<=PS_BIT || extra) olen = strlen(out);
+ olen = strlen(out);
if (field->which<=PS_BIT && olen>abslen) {
// overflow but remember by how much
extra += olen-abslen;