title: C replace char in char array
body: <p>Folks, need to search through a character array and replace any occurrence of '+','/',or'=' with '%2B','%2F', and '%2F' respectively</p>
  
  <p>base64output variable looks like</p>
  
  <pre><code>FtCPpza+Z0FASDFvfgtoCZg5zRI=
  </code></pre>
  
  <p>code</p>
  
  <pre><code>char *signature = replace_char(base64output, "+", "%2B");
  signature = replace_char(signature, "/", "%2F");
  signature = replace_char(signature, "=", "%3B");
  
  char replace_char (char *s, char find, char replace) {
      while (*s != 0) {
          if (*s == find)
          *s = replace;
          s++;
      }
      return s;
  }
  </code></pre>
  
  <p>(Errors out with)</p>
  
  <pre><code>   s.c:266: warning: initialization makes pointer from integer without a cast
  </code></pre>
  
  <p>What am i doing wrong? Thanks!</p>