[git commit] libbb: add a comment describing the way is_prefixed_with() works

Denys Vlasenko vda.linux at googlemail.com
Tue Aug 25 13:04:16 UTC 2015


commit: http://git.busybox.net/busybox/commit/?id=0a4d0e8fbf119e61f7223ac00a42505abf7eb168
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Bartosz Golaszewski <bartekgola at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/compare_string_array.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c
index 450916c..cdcb271 100644
--- a/libbb/compare_string_array.c
+++ b/libbb/compare_string_array.c
@@ -5,6 +5,11 @@
 
 #include "libbb.h"
 
+/*
+ * Return NULL if string is not prefixed with key. Return pointer to the
+ * first character in string after the prefix key. If key is an empty string,
+ * return pointer to the beginning of string.
+ */
 char* FAST_FUNC is_prefixed_with(const char *string, const char *key)
 {
 #if 0	/* Two passes over key - probably slower */


More information about the busybox-cvs mailing list