Thread (89 messages) 89 messages, 3 authors, 2016-06-15

[PATCH 13/86] test-line-buffer: replace prefixcmd() with has_prefix()

flat view
STALE3781d

From: Christian Couder <hidden>
Date: 2016-06-15 22:59:12
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Christian Couder <redacted>
---
 test-line-buffer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test-line-buffer.c b/test-line-buffer.c
index ef1d7ba..ed0d681 100644
--- a/test-line-buffer.c
+++ b/test-line-buffer.c
@@ -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 (has_prefix(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 (has_prefix(command, "copy ")) {
 			buffer_copy_bytes(buf, strtouint32(arg));
 			return;
 		}
 	case 's':
-		if (!prefixcmp(command, "skip ")) {
+		if (has_prefix(command, "skip ")) {
 			buffer_skip_bytes(buf, strtouint32(arg));
 			return;
 		}
-- 
1.8.4.1.566.geca833c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help