]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Some static
authorDale Weiler <killfieldengine@gmail.com>
Sun, 2 Jun 2013 05:32:37 +0000 (05:32 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 2 Jun 2013 05:32:37 +0000 (05:32 +0000)
util.c

diff --git a/util.c b/util.c
index ae95df53a1cb0118dcee54f6c9373b2ccabd580e..3dcf87322c7f0c86f06097ca1e4ea75b6c0463b5 100644 (file)
--- a/util.c
+++ b/util.c
@@ -182,24 +182,24 @@ typedef struct {
 
 typedef size_entry_t **size_table_t;
 
 
 typedef size_entry_t **size_table_t;
 
-size_table_t util_st_new() {
+static size_table_t util_st_new() {
     return (size_table_t)memset(
         mem_a(sizeof(size_entry_t*) * ST_SIZE),
         0, ST_SIZE * sizeof(size_entry_t*)
     );
 }
     return (size_table_t)memset(
         mem_a(sizeof(size_entry_t*) * ST_SIZE),
         0, ST_SIZE * sizeof(size_entry_t*)
     );
 }
-void util_st_del(size_table_t table) {
+static void util_st_del(size_table_t table) {
     size_t i = 0;
     for (; i < ST_SIZE; i++) if(table[i]) mem_d(table[i]);
     mem_d(table);
 }
     size_t i = 0;
     for (; i < ST_SIZE; i++) if(table[i]) mem_d(table[i]);
     mem_d(table);
 }
-size_entry_t *util_st_get(size_table_t table, size_t key) {
+static size_entry_t *util_st_get(size_table_t table, size_t key) {
     size_t hash = (key % ST_SIZE);
     while (table[hash] && table[hash]->key != key)
         hash = (hash + 1) % ST_SIZE;
     return table[hash];
 }
     size_t hash = (key % ST_SIZE);
     while (table[hash] && table[hash]->key != key)
         hash = (hash + 1) % ST_SIZE;
     return table[hash];
 }
-void util_st_put(size_table_t table, size_t key, size_t value) {
+static void util_st_put(size_table_t table, size_t key, size_t value) {
     size_t hash = (key % ST_SIZE);
     while (table[hash] && table[hash]->key != key)
         hash = (hash + 1) % ST_SIZE;
     size_t hash = (key % ST_SIZE);
     while (table[hash] && table[hash]->key != key)
         hash = (hash + 1) % ST_SIZE;