All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Assmann <sassmann@suse.de>
To: kexec@lists.infradead.org
Subject: [PATCH] make memcmp arguments const
Date: Mon, 03 Nov 2008 15:34:36 +0100	[thread overview]
Message-ID: <490F0BFC.5070504@suse.de> (raw)

In purgatory/string.c the definition of memcmp is
	int memcmp(void *src1, void *src2, size_t len)
man memcmp reveals
	int memcmp(const void *s1, const void *s2, size_t n)

Signed-off-by: Stefan Assmann <sassmann@suse.de>

---
 purgatory/string.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/purgatory/string.c
+++ b/purgatory/string.c
@@ -36,9 +36,9 @@ void* memcpy(void *dest, const void *src
 }


-int memcmp(void *src1, void *src2, size_t len)
+int memcmp(const void *src1, const void *src2, size_t len)
 {
-	unsigned char *s1, *s2;
+	const unsigned char *s1, *s2;
 	size_t i;
 	s1 = src1;
 	s2 = src2;
-- 
Stefan Assmann          | SUSE LINUX Products GmbH
Software Engineer       | Maxfeldstr. 5, D-90409 Nuernberg
Mail : sassmann@suse.de | GF: Markus Rex, HRB 16746 (AG Nuernberg)

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

             reply	other threads:[~2008-11-03 14:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 14:34 Stefan Assmann [this message]
2008-11-03 22:19 ` [PATCH] make memcmp arguments const Simon Horman
2008-11-04  9:45   ` Stefan Assmann

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=490F0BFC.5070504@suse.de \
    --to=sassmann@suse.de \
    --cc=kexec@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.