diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-28 09:26:09 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-28 09:26:09 +0000 |
commit | c3e2c261e08260fce94a223fe904eb149144296e (patch) | |
tree | 38c3cfc6654cd41f35e24cd0a4b21bcb0efb9c07 | |
parent | eb60f1b561e6051f5b1ec7b66399d8e38ea28794 (diff) |
sdbm: constified
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@62978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ext/sdbm/_sdbm.c | 4 | ||||
-rw-r--r-- | ext/sdbm/sdbm.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c index 85f6098130..e598946e79 100644 --- a/ext/sdbm/_sdbm.c +++ b/ext/sdbm/_sdbm.c @@ -128,7 +128,7 @@ static int makroom proto((DBM *, long, int)); #define OFF_PAG(off) (long) (off) * PBLKSIZ #define OFF_DIR(off) (long) (off) * DBLKSIZ -static long masks[] = { +static const long masks[] = { 000000000000L, 000000000001L, 000000000003L, 000000000007L, 000000000017L, 000000000037L, 000000000077L, 000000000177L, 000000000377L, @@ -142,7 +142,7 @@ static long masks[] = { 007777777777L, 017777777777L }; -datum nullitem = {NULL, 0}; +const datum nullitem = {NULL, 0}; DBM * sdbm_open(register char *file, register int flags, register int mode) diff --git a/ext/sdbm/sdbm.h b/ext/sdbm/sdbm.h index c3b53c4a8f..ba83c41ed4 100644 --- a/ext/sdbm/sdbm.h +++ b/ext/sdbm/sdbm.h @@ -52,7 +52,7 @@ typedef struct { int dsize; } datum; -extern datum nullitem; +extern const datum nullitem; #if defined(__STDC__) #define proto(p) p |