From e581fa3fea893a89e95a04757696afd00a63b8d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B6ppner?= Date: Tue, 5 Dec 2017 15:49:17 +0100 Subject: [PATCH] dasdinfo: Fix false line breaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 61b60baf57d0 ("dasdinfo: Fix GCC 7 overflow warning") erroneously introduced line breaks to the UID (-u) output. To be consistent with the extended uid ouput code, keep the newley indroduced line breaks and remove the additional one from the string split above instead. Fixes: 61b60baf57d0 ("dasdinfo: Fix GCC 7 overflow warning") Signed-off-by: Jan Höppner Signed-off-by: Michael Holzheu --- dasdinfo/dasdinfo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dasdinfo/dasdinfo.c b/dasdinfo/dasdinfo.c index f881f03a..334140c1 100644 --- a/dasdinfo/dasdinfo.c +++ b/dasdinfo/dasdinfo.c @@ -716,8 +716,7 @@ int main(int argc, char * argv[]) break; } if (srchuid) { - srchuid[0] = '\n'; - srchuid[1] = 0; + srchuid[0] = '\0'; } if (export) { printf("ID_UID=%s\n", readbuf);