Cosmetic improvement

This commit is contained in:
Andrew Bettison 2012-05-24 11:28:06 +09:30
parent 60e4209b88
commit 71781b6c12

10
log.c
View File

@ -62,18 +62,18 @@ void vlogMessage(int level, char *fmt, va_list ap)
fprintf(stderr, "%s: %s\n", levelstr, buf);
}
const char *trimbuildpath(const char *s)
const char *trimbuildpath(const char *path)
{
/* Remove common path prefix */
int lastsep = 0;
int i;
for (i = 0; __FILE__[i] && s[i]; ++i) {
if (i && s[i - 1] == '/')
for (i = 0; __FILE__[i] && path[i]; ++i) {
if (i && path[i - 1] == '/')
lastsep = i;
if (__FILE__[i] != s[i])
if (__FILE__[i] != path[i])
break;
}
return &s[lastsep];
return &path[lastsep];
}
int setReason(char *fmt, ...)