summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e11c410)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
void strip_blank_end(char *p)
{
void strip_blank_end(char *p)
{
- char *s = p + strlen(p) - 1;
-
+ char *s;
+
+ s = strchr(p, ';');
+ if (s)
+ *s = '\0';
+ s = strchr(p, '#');
+ if (s)
+ *s = '\0';
+ if (s)
+ p = s;
+
+ s = p + strlen(p) - 1;
while (isspace(*s) || iscntrl(*s))
s--;
while (isspace(*s) || iscntrl(*s))
s--;