aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hash.c6
-rw-r--r--src/lex.l4
-rw-r--r--src/proto.h1
3 files changed, 6 insertions, 5 deletions
diff --git a/src/hash.c b/src/hash.c
index 21d15dc..52fbc82 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -33,11 +33,11 @@ _gdbm_hash (datum key)
33 int index; /* Used to cycle through random values. */ 33 int index; /* Used to cycle through random values. */
34 34
35 /* Set the initial value from key. */ 35 /* Set the initial value from key. */
36 value = 0x238F13AF * key.dsize; 36 value = 0x238F13AFu * key.dsize;
37 for (index = 0; index < key.dsize; index++) 37 for (index = 0; index < key.dsize; index++)
38 value = (value + (key.dptr[index] << (index*5 % 24))) & 0x7FFFFFFF; 38 value = (value + (key.dptr[index] << ((unsigned) index * 5 % 24))) & 0x7FFFFFFF;
39 39
40 value = (1103515243 * value + 12345) & 0x7FFFFFFF; 40 value = (1103515243u * value + 12345) & 0x7FFFFFFF;
41 41
42 /* Return the value. */ 42 /* Return the value. */
43 return((int) value); 43 return((int) value);
diff --git a/src/lex.l b/src/lex.l
index 7840794..7faf046 100644
--- a/src/lex.l
+++ b/src/lex.l
@@ -136,11 +136,11 @@ input_context_pop (void)
136 cp = context_tos->parent; 136 cp = context_tos->parent;
137 free (context_tos); 137 free (context_tos);
138 context_tos = cp; 138 context_tos = cp;
139 yy_delete_buffer (YY_CURRENT_BUFFER);
139 if (!cp) 140 if (!cp)
140 return 1; 141 return 1;
141 142
142 yylloc = cp->locus; 143 yylloc = cp->locus;
143 yy_delete_buffer (YY_CURRENT_BUFFER);
144 yy_switch_to_buffer (cp->buf); 144 yy_switch_to_buffer (cp->buf);
145 145
146 return 0; 146 return 0;
diff --git a/src/proto.h b/src/proto.h
index ab34d75..2171250 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -127,6 +127,7 @@ gdbm_file_sync (GDBM_FILE dbf)
127 GDBM_SET_ERRNO (dbf, GDBM_FILE_SYNC_ERROR, TRUE); 127 GDBM_SET_ERRNO (dbf, GDBM_FILE_SYNC_ERROR, TRUE);
128 return 1; 128 return 1;
129 } 129 }
130 return 0;
130#else 131#else
131 sync (); 132 sync ();
132 sync (); 133 sync ();

Return to:

Send suggestions and report system problems to the System administrator.