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:
@ -611,7 +611,7 @@ static int read_unvectored(char *restrict const dst, unsigned sz, const char* wh
|
|||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
if(n){
|
if(n){
|
||||||
int i=n;
|
int i=n-1;
|
||||||
while(i--)
|
while(i--)
|
||||||
if(dst[i]=='\n' || dst[i]=='\0') dst[i]=sep;
|
if(dst[i]=='\n' || dst[i]=='\0') dst[i]=sep;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user