send-email: recognize absolute path on Windows
[gitweb.git] / test-line-buffer.c
index 7ec9b13c9b2ceb84fb6dd0dd229e9f6cb8c1a635..1e58f0476f3465f9b8b361cc4776abf5c051430b 100644 (file)
@@ -19,7 +19,7 @@ static void handle_command(const char *command, const char *arg, struct line_buf
 {
        switch (*command) {
        case 'b':
-               if (!prefixcmp(command, "binary ")) {
+               if (starts_with(command, "binary ")) {
                        struct strbuf sb = STRBUF_INIT;
                        strbuf_addch(&sb, '>');
                        buffer_read_binary(buf, &sb, strtouint32(arg));
@@ -28,12 +28,12 @@ static void handle_command(const char *command, const char *arg, struct line_buf
                        return;
                }
        case 'c':
-               if (!prefixcmp(command, "copy ")) {
+               if (starts_with(command, "copy ")) {
                        buffer_copy_bytes(buf, strtouint32(arg));
                        return;
                }
        case 's':
-               if (!prefixcmp(command, "skip ")) {
+               if (starts_with(command, "skip ")) {
                        buffer_skip_bytes(buf, strtouint32(arg));
                        return;
                }
@@ -87,6 +87,5 @@ int main(int argc, char *argv[])
                die("input error");
        if (ferror(stdout))
                die("output error");
-       buffer_reset(&stdin_buf);
        return 0;
 }