gcc 3.0 warnings
This commit is contained in:
@ -29,8 +29,8 @@ unsigned print_str(FILE* file, char *s, unsigned max) {
|
||||
to octal as we go, separating items of the list by 'sep' and stopping after
|
||||
processing max chars of output (accounting for expansion due to octal rep).
|
||||
*/
|
||||
unsigned print_strlist(FILE* file, char **strs, char* sep, unsigned max) {
|
||||
int i, n, seplen = strlen(sep);
|
||||
unsigned print_strlist(FILE* file, char **strs, unsigned max) {
|
||||
int i, n;
|
||||
for (n=0; *strs && n < max; strs++) {
|
||||
for (i=0; strs[0][i] && n+i < max; i++)
|
||||
if (isprint(strs[0][i]) || strs[0][i] == ' ')
|
||||
@ -43,9 +43,9 @@ unsigned print_strlist(FILE* file, char **strs, char* sep, unsigned max) {
|
||||
return max - n;
|
||||
}
|
||||
n += i;
|
||||
if (n + seplen < max) {
|
||||
fputs(sep, file);
|
||||
n += seplen;
|
||||
if (n + 1 < max) {
|
||||
fputc(' ', file);
|
||||
n++;
|
||||
} else
|
||||
return max - n;
|
||||
}
|
||||
|
Reference in New Issue
Block a user