diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-12 13:44:14 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-12 13:44:14 +0000 |
commit | 54d4b6e74bf539930db2cafbe075416894900076 (patch) | |
tree | 29df64c4ff1eddc3c692b82556e3dde5dc2ae0ee /src/minutils/s6-ps.c | |
parent | 495d625add9e52b29a98c4fa2627a45d20d44849 (diff) | |
download | s6-linux-utils-54d4b6e74bf539930db2cafbe075416894900076.tar.xz |
Fix a few omissions2.3.0.0
Diffstat (limited to 'src/minutils/s6-ps.c')
-rw-r--r-- | src/minutils/s6-ps.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/minutils/s6-ps.c b/src/minutils/s6-ps.c index 5b1a568..c3d85fc 100644 --- a/src/minutils/s6-ps.c +++ b/src/minutils/s6-ps.c @@ -352,11 +352,11 @@ int main (int argc, char const *const *argv) { unsigned int rightformatted = !!(((uint64_t)1 << fieldlist[i]) & RIGHTFORMATTED) ; size_t len = strlen(s6ps_fieldheaders[fieldlist[i]]) ; - if (rightformatted && (buffer_put(buffer_1, spaces, maxlen[i] - len) < (int)(maxlen[i] - len))) + if (rightformatted && (buffer_put(buffer_1, spaces, maxlen[i] - len) < (ssize_t)(maxlen[i] - len))) goto nowrite ; - if (buffer_put(buffer_1, s6ps_fieldheaders[fieldlist[i]], len) < (int)len) + if (buffer_put(buffer_1, s6ps_fieldheaders[fieldlist[i]], len) < (ssize_t)len) goto nowrite ; - if ((i < nfields-1) && (buffer_put(buffer_1, spaces, !rightformatted * (maxlen[i] - len) + spacing) < (int)(!rightformatted * (maxlen[i] - len) + spacing))) + if ((i < nfields-1) && (buffer_put(buffer_1, spaces, !rightformatted * (maxlen[i] - len) + spacing) < (ssize_t)(!rightformatted * (maxlen[i] - len) + spacing))) goto nowrite ; } if (buffer_put(buffer_1, "\n", 1) < 1) goto nowrite ; @@ -367,11 +367,11 @@ int main (int argc, char const *const *argv) for (; j < nfields ; j++) { unsigned int rightformatted = !!(((uint64_t)1 << fieldlist[j]) & RIGHTFORMATTED) ; - if (rightformatted && (buffer_put(buffer_1, spaces, maxlen[j] - fmtlen[oi][j]) < (int)(maxlen[j] - fmtlen[oi][j]))) + if (rightformatted && (buffer_put(buffer_1, spaces, maxlen[j] - fmtlen[oi][j]) < (ssize_t)(maxlen[j] - fmtlen[oi][j]))) goto nowrite ; - if (buffer_put(buffer_1, p[oi].data.s + fmtpos[oi][j], fmtlen[oi][j]) < (int)fmtlen[oi][j]) + if (buffer_put(buffer_1, p[oi].data.s + fmtpos[oi][j], fmtlen[oi][j]) < (ssize_t)fmtlen[oi][j]) goto nowrite ; - if ((j < nfields-1) && (buffer_put(buffer_1, spaces, !rightformatted * (maxlen[j] - fmtlen[oi][j]) + spacing) < (int)(!rightformatted * (maxlen[j] - fmtlen[oi][j]) + spacing))) + if ((j < nfields-1) && (buffer_put(buffer_1, spaces, !rightformatted * (maxlen[j] - fmtlen[oi][j]) + spacing) < (ssize_t)(!rightformatted * (maxlen[j] - fmtlen[oi][j]) + spacing))) goto nowrite ; } if (buffer_put(buffer_1, "\n", 1) < 1) goto nowrite ; |