]> git.ipfire.org Git - thirdparty/git.git/blobdiff - test-line-buffer.c
replace {pre,suf}fixcmp() with {starts,ends}_with()
[thirdparty/git.git] / test-line-buffer.c
index ef1d7bae1441e07b6cb74e83a23d07b4720a8ebf..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;
                }