Util-Linux package development
 help / color / mirror / Atom feed
From: Andy Grover <agrover@redhat.com>
To: util-linux@vger.kernel.org
Subject: [PATCH] Mark char* params to blkid_dev_set_search as const
Date: Mon, 20 Nov 2017 12:09:50 -0800	[thread overview]
Message-ID: <20171120200950.11377-1-agrover@redhat.com> (raw)

They are not changed by the function.

Signed-off-by: Andy Grover <agrover@redhat.com>
---
 libblkid/src/blkid.h.in | 2 +-
 libblkid/src/dev.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libblkid/src/blkid.h.in b/libblkid/src/blkid.h.in
index ffd791ad1..a35b71388 100644
--- a/libblkid/src/blkid.h.in
+++ b/libblkid/src/blkid.h.in
@@ -149,7 +149,7 @@ extern const char *blkid_dev_devname(blkid_dev dev)
 
 extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache);
 extern int blkid_dev_set_search(blkid_dev_iterate iter,
-				char *search_type, char *search_value);
+				const char *search_type, const char *search_value);
 extern int blkid_dev_next(blkid_dev_iterate iterate, blkid_dev *dev);
 extern void blkid_dev_iterate_end(blkid_dev_iterate iterate);
 
diff --git a/libblkid/src/dev.c b/libblkid/src/dev.c
index 046cdce1b..056df2b86 100644
--- a/libblkid/src/dev.c
+++ b/libblkid/src/dev.c
@@ -148,7 +148,7 @@ blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache)
 }
 
 int blkid_dev_set_search(blkid_dev_iterate iter,
-				 char *search_type, char *search_value)
+				 const char *search_type, const char *search_value)
 {
 	char *new_type, *new_value;
 
-- 
2.13.6


             reply	other threads:[~2017-11-20 20:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 20:09 Andy Grover [this message]
2017-11-21  9:44 ` [PATCH] Mark char* params to blkid_dev_set_search as const Karel Zak

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=20171120200950.11377-1-agrover@redhat.com \
    --to=agrover@redhat.com \
    --cc=util-linux@vger.kernel.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