library: create cmdlines consistently with no trailing space
When PROC_FILLARG was used (invoking file2strvec) command lines contained no trailing space. When PROC_EDITCMDLCVT was used (invoking read_unvectored) command lines contained a trailing space. Now both routes to a cmdline act the same -- no trailing space.
This commit is contained in:
parent
ed59472307
commit
a5881b5a4e
@ -611,7 +611,7 @@ static int read_unvectored(char *restrict const dst, unsigned sz, const char* wh
|
||||
}
|
||||
close(fd);
|
||||
if(n){
|
||||
int i=n;
|
||||
int i=n-1;
|
||||
while(i--)
|
||||
if(dst[i]=='\n' || dst[i]=='\0') dst[i]=sep;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user