summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common.c')
-rw-r--r--common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common.c b/common.c
index 62f0a2e..17d82f2 100644
--- a/common.c
+++ b/common.c
@@ -8,7 +8,6 @@ indicate_file_area(FILE* fd, size_t line, size_t column, size_t span) {
char buf[1024] = { '\0' };
char *s = buf;
- char *line_start = buf;
rewind(fd);
while (line && !feof(fd) && fgets(buf, sizeof(buf), fd)) {
@@ -20,12 +19,13 @@ indicate_file_area(FILE* fd, size_t line, size_t column, size_t span) {
}
}
- while (*line_start == '\t' || *line_start == ' ') {
- line_start++;
+ s = buf;
+ while (*s == '\t' || *s == ' ') {
+ s++;
}
fputs(margin, stderr);
- fputs(line_start, stderr);
+ fputs(s, stderr);
/* corner case (still needed?) - buf was just return */
if (strlen(buf) == 1 && buf[0] == '\n') {