fix a grep bug

This commit is contained in:
Robert Morris 2019-09-05 16:50:55 -04:00
parent c0beeccb1b
commit fc337af2b6

View file

@ -26,8 +26,6 @@ grep(char *pattern, int fd)
}
p = q+1;
}
if(p == buf)
m = 0;
if(m > 0){
m -= p - buf;
memmove(buf, p, m);