regex: use regexec_buf()
[gitweb.git] / sha1_file.c
index b516874473e2d800d1bbad6e50fda4532bc9aae0..d0f2aa029b14451d4ffe669d48602c55060b9f42 100644 (file)
@@ -396,7 +396,7 @@ void add_to_alternates_file(const char *reference)
                struct strbuf line = STRBUF_INIT;
                int found = 0;
 
-               while (strbuf_getline(&line, in, '\n') != EOF) {
+               while (strbuf_getline(&line, in) != EOF) {
                        if (!strcmp(reference, line.buf)) {
                                found = 1;
                                break;