* [PATCH] [SCTP]: Replace char msg[] with static const char[].
@ 2008-03-14 22:48 Florian Westphal
0 siblings, 0 replies; 3+ messages in thread
From: Florian Westphal @ 2008-03-14 22:48 UTC (permalink / raw)
To: netdev; +Cc: Florian Westphal
133886 2004 220 136110 213ae sctp.new/sctp.o
134018 2004 220 136242 21432 sctp.old/sctp.o
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/sctp/sm_make_chunk.c | 2 +-
net/sctp/sm_statefuns.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index e45be4e..fabd951 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1782,7 +1782,7 @@ static int sctp_process_inv_paramlength(const struct sctp_association *asoc,
const struct sctp_chunk *chunk,
struct sctp_chunk **errp)
{
- char error[] = "The following parameter had invalid length:";
+ static const char error[] = "The following parameter had invalid length:";
size_t payload_len = WORD_ROUND(sizeof(error)) +
sizeof(sctp_paramhdr_t);
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index c0c6bee..6545b5f 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -4219,7 +4219,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
void *arg,
sctp_cmd_seq_t *commands)
{
- char err_str[]="The following chunk had invalid length:";
+ static const char err_str[]="The following chunk had invalid length:";
return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
sizeof(err_str));
@@ -4236,7 +4236,7 @@ static sctp_disposition_t sctp_sf_violation_paramlen(
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands) {
- char err_str[] = "The following parameter had invalid length:";
+ static const char err_str[] = "The following parameter had invalid length:";
return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
sizeof(err_str));
@@ -4255,7 +4255,7 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
void *arg,
sctp_cmd_seq_t *commands)
{
- char err_str[]="The cumulative tsn ack beyond the max tsn currently sent:";
+ static const char err_str[]="The cumulative tsn ack beyond the max tsn currently sent:";
return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
sizeof(err_str));
@@ -4274,7 +4274,7 @@ static sctp_disposition_t sctp_sf_violation_chunk(
void *arg,
sctp_cmd_seq_t *commands)
{
- char err_str[]="The following chunk violates protocol:";
+ static const char err_str[]="The following chunk violates protocol:";
if (!asoc)
return sctp_sf_violation(ep, asoc, type, arg, commands);
--
1.5.3.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] [SCTP]: Replace char msg[] with static const char[].
@ 2008-03-20 12:26 Florian Westphal
2008-03-24 5:46 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2008-03-20 12:26 UTC (permalink / raw)
To: lksctp-developers; +Cc: netdev, Florian Westphal
133886 2004 220 136110 213ae sctp.new/sctp.o
134018 2004 220 136242 21432 sctp.old/sctp.o
Signed-off-by: Florian Westphal <fw@strlen.de>
---
patch was previously sent on Mar. 14th 08.
net/sctp/sm_make_chunk.c | 2 +-
net/sctp/sm_statefuns.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 578630e..c898245 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1782,7 +1782,7 @@ static int sctp_process_inv_paramlength(const struct sctp_association *asoc,
const struct sctp_chunk *chunk,
struct sctp_chunk **errp)
{
- char error[] = "The following parameter had invalid length:";
+ static const char error[] = "The following parameter had invalid length:";
size_t payload_len = WORD_ROUND(sizeof(error)) +
sizeof(sctp_paramhdr_t);
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index c0c6bee..6545b5f 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -4219,7 +4219,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
void *arg,
sctp_cmd_seq_t *commands)
{
- char err_str[]="The following chunk had invalid length:";
+ static const char err_str[]="The following chunk had invalid length:";
return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
sizeof(err_str));
@@ -4236,7 +4236,7 @@ static sctp_disposition_t sctp_sf_violation_paramlen(
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands) {
- char err_str[] = "The following parameter had invalid length:";
+ static const char err_str[] = "The following parameter had invalid length:";
return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
sizeof(err_str));
@@ -4255,7 +4255,7 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
void *arg,
sctp_cmd_seq_t *commands)
{
- char err_str[]="The cumulative tsn ack beyond the max tsn currently sent:";
+ static const char err_str[]="The cumulative tsn ack beyond the max tsn currently sent:";
return sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,
sizeof(err_str));
@@ -4274,7 +4274,7 @@ static sctp_disposition_t sctp_sf_violation_chunk(
void *arg,
sctp_cmd_seq_t *commands)
{
- char err_str[]="The following chunk violates protocol:";
+ static const char err_str[]="The following chunk violates protocol:";
if (!asoc)
return sctp_sf_violation(ep, asoc, type, arg, commands);
--
1.5.3.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [SCTP]: Replace char msg[] with static const char[].
2008-03-20 12:26 Florian Westphal
@ 2008-03-24 5:46 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-03-24 5:46 UTC (permalink / raw)
To: fw; +Cc: lksctp-developers, netdev
From: Florian Westphal <fw@strlen.de>
Date: Thu, 20 Mar 2008 13:26:34 +0100
> 133886 2004 220 136110 213ae sctp.new/sctp.o
> 134018 2004 220 136242 21432 sctp.old/sctp.o
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-24 5:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 22:48 [PATCH] [SCTP]: Replace char msg[] with static const char[] Florian Westphal
-- strict thread matches above, loose matches on Subject: below --
2008-03-20 12:26 Florian Westphal
2008-03-24 5:46 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).