mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jan Luebbe <jlu@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] stringlist: the string argument should be const
Date: Wed,  3 Dec 2014 15:33:59 +0100	[thread overview]
Message-ID: <1417617240-16852-1-git-send-email-jlu@pengutronix.de> (raw)

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 include/stringlist.h | 4 ++--
 lib/stringlist.c     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/stringlist.h b/include/stringlist.h
index 2e2addf98f19..e85500a99485 100644
--- a/include/stringlist.h
+++ b/include/stringlist.h
@@ -8,9 +8,9 @@ struct string_list {
 	char *str;
 };
 
-int string_list_add(struct string_list *sl, char *str);
+int string_list_add(struct string_list *sl, const char *str);
 int string_list_add_asprintf(struct string_list *sl, const char *fmt, ...);
-int string_list_add_sorted(struct string_list *sl, char *str);
+int string_list_add_sorted(struct string_list *sl, const char *str);
 int string_list_contains(struct string_list *sl, const char *str);
 void string_list_print_by_column(struct string_list *sl);
 
diff --git a/lib/stringlist.c b/lib/stringlist.c
index 57801b3bb04d..8a18366a96d5 100644
--- a/lib/stringlist.c
+++ b/lib/stringlist.c
@@ -13,7 +13,7 @@ static int string_list_compare(struct list_head *a, struct list_head *b)
 	return strcmp(astr, bstr);
 }
 
-int string_list_add(struct string_list *sl, char *str)
+int string_list_add(struct string_list *sl, const char *str)
 {
 	struct string_list *new;
 
@@ -48,7 +48,7 @@ int string_list_add_asprintf(struct string_list *sl, const char *fmt, ...)
 	return 0;
 }
 
-int string_list_add_sorted(struct string_list *sl, char *str)
+int string_list_add_sorted(struct string_list *sl, const char *str)
 {
 	struct string_list *new;
 
-- 
2.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2014-12-03 14:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 14:33 Jan Luebbe [this message]
2014-12-03 14:34 ` [PATCH 2/2] fdt: of_unflatten_dtb can work on const data Jan Luebbe
2014-12-04  7:24 ` [PATCH 1/2] stringlist: the string argument should be const Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417617240-16852-1-git-send-email-jlu@pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox