]> granicus.if.org Git - strace/commitdiff
2004-10-06 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Wed, 6 Oct 2004 22:11:54 +0000 (22:11 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 6 Oct 2004 22:11:54 +0000 (22:11 +0000)
* file.c (sprintmode): Add const to return type.
(sprintfstype): Likewise.
* signal.c (printsiginfo): Add a const.

file.c
signal.c

diff --git a/file.c b/file.c
index 7d9e7aba061ecf15a6edea39dadf83a269873c1a..bbbebe8ac658fea5afedf13d9e421de05d15dea4 100644 (file)
--- a/file.c
+++ b/file.c
@@ -555,12 +555,12 @@ static const struct xlat modetypes[] = {
        { 0,            NULL            },
 };
 
-static char *
+static const char *
 sprintmode(mode)
 int mode;
 {
        static char buf[64];
-       char *s;
+       const char *s;
 
        if ((mode & S_IFMT) == 0)
                s = "";
@@ -1437,13 +1437,13 @@ static const struct xlat fsmagic[] = {
 
 #ifndef SVR4
 
-static char *
+static const char *
 sprintfstype(magic)
 int magic;
 {
        static char buf[32];
 #ifdef LINUX
-       char *s;
+       const char *s;
 
        s = xlookup(fsmagic, magic);
        if (s) {
index 657db238a0c60410bcf50bed6113c4d53b086841..e846f6c23f73b9e4394f0455af073e38a4c1b2c2 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -643,7 +643,7 @@ printsiginfo(sip, verbose)
 siginfo_t *sip;
 int verbose;
 {
-       char *code;
+       const char *code;
 
        if (sip->si_signo == 0) {
                tprintf ("{}");