2.4.3-ac5 - static const char *foo to static char foo[]

2.4.3-ac5 - static const char *foo to static char foo[]

Post by Francois Romie » Sat, 14 Apr 2001 06:30:14



Hello,

  it compiles fine and there is no MAINTAINER entry for it nor specific
email address in the source file.

diff -u --recursive linux-2.4.3-ac5.orig/drivers/char/keyboard.c linux-2.4.3-ac5/drivers/char/keyboard.c
--- linux-2.4.3-ac5.orig/drivers/char/keyboard.c        Thu Apr 12 20:23:06 2001

 static void do_pad(unsigned char value, char up_flag)
 {
-       static const char *pad_chars = "0123456789+-*/\015,.?()";
-       static const char *app_map = "pqrstuvwxylSRQMnnmPQ";
+       static char pad_chars[] = "0123456789+-*/\015,.?()";
+       static char app_map[] = "pqrstuvwxylSRQMnnmPQ";

        if (up_flag)

 static void do_cur(unsigned char value, char up_flag)
 {
-       static const char *cur_chars = "BDCA";
+       static char cur_chars[] = "BDCA";
        if (up_flag)
                return;

--
Ueimor
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. KernelJanitor - Change applicable char *foo to char foo[]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch applies to Linux 2.5.68. It converts appropriate string declarations(those which are only read) to the memory saving char foo[] version.

http://muss.mcmaster.ca/~devenyga/linux-2.5.68-char-changes.patch

Please CC me with any discussion.
- --
Building the Future,
Gabriel Devenyi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+tvlk7I5UBdiZaF4RAnUyAJwNpcGmuWfzGjN9qVBjTF90XgKvjgCfX2pt
wcfQq8U4yIegqjoA+paMK6k=
=HF++
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Cross compiler for DOS/Win?

3. Q: file:/foo/foo.gif = /foo/foo.gif ?

4. Secure DNS Server possible?

5. GCC: choosing foo() over foo() const ... because conversion sequence for the argument is better.

6. Traffic Shaping

7. Why ${FOO} or $(FOO) instead of just $FOO ?

8. sar command error

9. Multiple variables, ie: foo=1&foo=2&foo=3

10. foo=X%XY%Z; echo ${foo//X/w} works;echo ${foo//%%/p} NotWhatIwant

11. [2.5] const char* to char* conversion in console.h

12. const char* to char* update in console.h

13. Gnu C++ stream.h char* form(const char*, ...)