This loop isn't quite right - I think it should be
while (eol > found) { if isspace(eol[-1]).

However since found[-1] = '=' it will always terminate early enough - and in fact the while condition is a bit redundant.