title: Purpose of simple wrapper function in C
body: <p>In <a href="http://c.learncodethehardway.org/book/ex26.html" rel="nofollow">ex26</a> of 'Learn C the Hard Way' in the <code>db.c</code> file Zed defines two functions:</p>
  
  <pre><code>static FILE *DB_open(const char *path, const char *mode) {
  return fopen(path, mode);
  }
  static void DB_close(FILE *db) {
  fclose(db);
  }
  </code></pre>
  
  <p>I have a hard time understanding the purpose/need for wrapping these very simple calls to <code>fopen</code> and <code>fclose</code>. What are, if any, the advantages of wrapping very simple functions, like the example given above?</p>