Skip to contentSkip to conversation

net/sunrpc string * to [] fix

PATCH In review Ricardo Nabinger Sanchez 2 participants 3 messages May 25, 2005 – May 26, 2005

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/sunrpc string * to [] fix

Hello,

I'm new here, and would like to help with Kernel-Janitors. If nobody else is working on 'char *s = "string";', I'd like to continue fixing the remaining strings (473 to go).

This patch "fixes" net/sunrpc/sched.c and svcauth_unix.c string declarations from
char *p = "string"
to

	char p[] = "string";

as pointed by Jeff Garzik on Kernel-Janitors' TODO.

Apologies for attaching the patch (and not inlining it), but it would be mangled otherwise. I'll try to fix this.

Best regards.

---

 sched.c        |    2 +-
 svcauth_unix.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 6 lines
Ricardo Nabinger Sanchez
GNU/Linux #140696 [http://counter.li.org]
Slackware Linux + FreeBSD

    How long a minute is depends on which 
    side of the bathroom door you're on.
net/sunrpc/sched.c +1 -1
diff -urNp -X dontdiff linux-2.6.11.10/net/sunrpc/sched.c mod-linux-2.6.11.10/net/sunrpc/sched.c
@@ -1054,7 +1054,7 @@ void rpc_show_tasks(void)
 	printk("-pid- proc flgs status -client- -prog- --rqstp- -timeout "
 		"-rpcwait -action- --exit--\n");
 	alltask_for_each(t, le, &all_tasks) {
-		const char *rpc_waitq = "none";
+		const char rpc_waitq[] = "none";
 
 		if (RPC_IS_QUEUED(t))
 			rpc_waitq = rpc_qname(t->u.tk_wait.rpc_waitq);
net/sunrpc/svcauth_unix.c +1 -1
diff -urNp -X dontdiff linux-2.6.11.10/net/sunrpc/svcauth_unix.c mod-linux-2.6.11.10/net/sunrpc/svcauth_unix.c
@@ -222,7 +222,7 @@ static int ip_map_show(struct seq_file *
 {
 	struct ip_map *im;
 	struct in_addr addr;
-	char *dom = "-no-domain-";
+	char dom[] = "-no-domain-";
 
 	if (h == NULL) {
 		seq_puts(m, "#class IP domain\n");

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 1 line

Content-Transfer-Encoding: quoted-printable

Please set to plain text (disk.c patch is ok in this regard).

Quoted 20 lines · Ricardo Nabinger Sanchez

Hello,

I'm new here, and would like to help with Kernel-Janitors. If nobody else is working on 'char *s = "string";', I'd like to continue fixing the remaining strings (473 to go).

This patch "fixes" net/sunrpc/sched.c and svcauth_unix.c string declarations from
char *p = "string"
to

	char p[] = "string";

as pointed by Jeff Garzik on Kernel-Janitors' TODO.

Apologies for attaching the patch (and not inlining it), but it would be mangled otherwise. I'll try to fix this.

Best regards.

Quoted 7 lines

---

 sched.c        |    2 +-
 svcauth_unix.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Put this line before "---", as everything after it is discarded.

net/sunrpc/sched.c void rpc_show_tasks(void) · line 1060

Quoted 12 lines

diff -urNp -X dontdiff linux-2.6.11.10/net/sunrpc/sched.c mod-linux-2.6.11.10/net/sunrpc/sched.c

net/sunrpc/sched.c +1 -1
@@ -1054,7 +1054,7 @@ void rpc_show_tasks(void)
 	printk("-pid- proc flgs status -client- -prog- --rqstp- -timeout "
 		"-rpcwait -action- --exit--\n");
 	alltask_for_each(t, le, &all_tasks) {
-		const char *rpc_waitq = "none";
+		const char rpc_waitq[] = "none";
 
 		if (RPC_IS_QUEUED(t))
 			rpc_waitq = rpc_qname(t->u.tk_wait.rpc_waitq);

^^^ this won't work now. Compile test should
catch this.

Care to resend disk.c patch, as it's missing Signed-off-by (and this seems to be the only thing wrong with it).

Domen

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#2 lore raw
In reply to Ricardo Nabinger Sanchez

Quoting Domen Puncer <[email protected]>
Sent on Thu, 26 May 2005 08:15:42 +0200

Quoted 2 lines

Care to resend disk.c patch, as it's missing Signed-off-by (and this seems to be the only thing wrong with it).

After taking a new look over the code, I noticed that this patch would break stuff. As the string is modified afterwards (with an assignment), it would compile fail. I surely overlooked it. Sorry :)

So, my very first patch is broken :)
Please disregard (and/or drop) it.

Signature · 6 lines
Ricardo Nabinger Sanchez
GNU/Linux #140696 [http://counter.li.org]
Slackware Linux + FreeBSD

    How long a minute is depends on which 
    side of the bathroom door you're on.

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors