summaryrefslogtreecommitdiff
path: root/src/basic/fileio-label.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-01 21:45:23 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commitae22dea58699350462ac7100283bec6919a60765 (patch)
tree7d0b7aa2912b02c823a147f8291a9b4186e80f74 /src/basic/fileio-label.h
parent5acc15fbb0ce306d4a2f4e0d47f4c5d5ac433b08 (diff)
string-util: tweak cellescape() a bit
For short buffer sizes cellescape() was a bit wasteful, as it might suffice to to drop a single character to find enough place for the full four byte ellipsis, if that one character was a four character escape. With this rework we'll guarantee to drop the minimum number of characters from the end to fit in the ellipsis. If the buffers we write to are large this doesn't matter much. However, if they are short (as they are when talking about the process comm field) then it starts to matter that we put as much information as we can in the space we get.
Diffstat (limited to 'src/basic/fileio-label.h')
0 files changed, 0 insertions, 0 deletions