forked from pool/util-linux
27 lines
325 B
Diff
27 lines
325 B
Diff
|
--- misc-utils/cal.c
|
||
|
+++ misc-utils/cal.c
|
||
|
@@ -702,18 +702,16 @@
|
||
|
}
|
||
|
|
||
|
void
|
||
|
-trim_trailing_spaces(s)
|
||
|
- char *s;
|
||
|
+trim_trailing_spaces(char *s)
|
||
|
{
|
||
|
char *p;
|
||
|
|
||
|
for (p = s; *p; ++p)
|
||
|
continue;
|
||
|
- while (p > s && isspace(*--p))
|
||
|
- continue;
|
||
|
- if (p > s)
|
||
|
- ++p;
|
||
|
- *p = '\0';
|
||
|
+
|
||
|
+ p--;
|
||
|
+ if (isspace(*p))
|
||
|
+ *p = '\0';
|
||
|
}
|
||
|
|
||
|
/*
|