Commit 3dcd2b82 authored by Yang Tse's avatar Yang Tse
Browse files

fix print formatting string directives

parent c0f3e324
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -6,6 +6,9 @@

                                  Changelog

Yang Tse (4 Sep 2008)
- Several fixes related with print formatting string directives.

Daniel Fandrich (3 Sep 2008)
- Search for the FreeBSD CA cert file /usr/local/share/certs/ca-root.crt

+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ int main(int argc, argv_item_t argv[], char **envp)
  data = (unsigned char *)suck(&dataLen);
  base64Len = Curl_base64_encode(handle, data, dataLen, &base64);

  fprintf(stderr, "%d\n", base64Len);
  fprintf(stderr, "%zu\n", base64Len);
  fprintf(stdout, "%s\n", base64);

  free(base64); free(data);
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
  if(!d->cnonce) {
    /* Generate a cnonce */
    now = Curl_tvnow();
    snprintf(cnoncebuf, sizeof(cnoncebuf), "%06ld", now.tv_sec);
    snprintf(cnoncebuf, sizeof(cnoncebuf), "%06ld", (long)now.tv_sec);
    if(Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), &cnonce))
      d->cnonce = cnonce;
    else
+4 −4
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -167,7 +167,7 @@ void *curl_docalloc(size_t wanted_elements, size_t wanted_size,
  }

  if(logfile && source)
    fprintf(logfile, "MEM %s:%d calloc(%u,%u) = %p\n",
    fprintf(logfile, "MEM %s:%d calloc(%zu,%zu) = %p\n",
            source, line, wanted_elements, wanted_size, mem ? mem->mem : 0);
  return (mem ? mem->mem : NULL);
}
@@ -189,7 +189,7 @@ char *curl_dostrdup(const char *str, int line, const char *source)
    memcpy(mem, str, len);

  if(logfile)
    fprintf(logfile, "MEM %s:%d strdup(%p) (%zd) = %p\n",
    fprintf(logfile, "MEM %s:%d strdup(%p) (%zu) = %p\n",
            source, line, str, len, mem);

  return mem;
@@ -212,7 +212,7 @@ void *curl_dorealloc(void *ptr, size_t wantedsize,

  mem=(struct memdebug *)(Curl_crealloc)(mem, size);
  if(logfile)
    fprintf(logfile, "MEM %s:%d realloc(%p, %zd) = %p\n",
    fprintf(logfile, "MEM %s:%d realloc(%p, %zu) = %p\n",
            source, line, ptr, wantedsize, mem?mem->mem:NULL);

  if(mem) {
+2 −2
Original line number Diff line number Diff line
@@ -1096,7 +1096,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
      n = strrchr(data->set.str[STRING_CERT], '/');
      if(n) {
        n++; /* skip last slash */
        snprintf(nickname, PATH_MAX, "PEM Token #%ld:%s", 1, n);
        snprintf(nickname, PATH_MAX, "PEM Token #%d:%s", 1, n);
      }
    }
    else {
@@ -1164,7 +1164,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
      n = strrchr(data->set.str[STRING_SSL_ISSUERCERT], '/');
      if (n) {
        n++; /* skip last slash */
        snprintf(nickname, PATH_MAX, "PEM Token #%ld:%s", 1, n);
        snprintf(nickname, PATH_MAX, "PEM Token #%d:%s", 1, n);
      }
    }
    else {
Loading