1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-26 15:37:03 +01:00

Fixed indentation and indented cpp directives

--
This commit is contained in:
Werner Koch 2012-12-19 15:30:17 +01:00
parent d23ec86095
commit 20c95ef258
2 changed files with 62 additions and 58 deletions

View File

@ -1544,9 +1544,11 @@ connect_server (const char *server, unsigned short port,
unsigned int flags, struct http_srv *srv) unsigned int flags, struct http_srv *srv)
{ {
int sock = -1; int sock = -1;
int srvcount = 0, fakesrv = 0; int srvcount = 0;
int fakesrv = 0;
int hostfound = 0; int hostfound = 0;
int srvindex, connected, chosen=-1; int srvindex, connected;
int chosen = -1;
int last_errno = 0; int last_errno = 0;
struct srventry *serverlist = NULL; struct srventry *serverlist = NULL;
@ -1714,7 +1716,7 @@ connect_server (const char *server, unsigned short port,
} }
#endif /* !HAVE_GETADDRINFO */ #endif /* !HAVE_GETADDRINFO */
if(!fakesrv && chosen>-1 && srv) if(!fakesrv && chosen >- 1 && srv)
{ {
srv->used_server = xstrdup (serverlist[chosen].target); srv->used_server = xstrdup (serverlist[chosen].target);
srv->used_port = serverlist[chosen].port; srv->used_port = serverlist[chosen].port;

View File

@ -36,29 +36,30 @@
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#ifdef HAVE_GETOPT_H #ifdef HAVE_GETOPT_H
#include <getopt.h> # include <getopt.h>
#endif #endif
#ifdef HAVE_LIBCURL #ifdef HAVE_LIBCURL
#include <curl/curl.h> # include <curl/curl.h>
/* This #define rigamarole is to enable a hack to fake DNS SRV using /* This #define rigamarole is to enable a hack to fake DNS SRV using
libcurl. It only works if we have getaddrinfo(), inet_ntop(), and libcurl. It only works if we have getaddrinfo(), inet_ntop(), and
a modern enough version of libcurl (7.21.3) so we can use a modern enough version of libcurl (7.21.3) so we can use
CURLOPT_RESOLVE to feed the resolver from the outside to force CURLOPT_RESOLVE to feed the resolver from the outside to force
libcurl to pass the right SNI. */ libcurl to pass the right SNI. */
#if defined(HAVE_GETADDRINFO) && defined(HAVE_INET_NTOP) && LIBCURL_VERNUM >= 0x071503 # if (defined(HAVE_GETADDRINFO) && defined(HAVE_INET_NTOP) \
#include <sys/types.h> && LIBCURL_VERNUM >= 0x071503)
#include <sys/socket.h> # include <sys/types.h>
#include <netdb.h> # include <sys/socket.h>
#include <arpa/inet.h> # include <netdb.h>
# include <arpa/inet.h>
# else
# undef USE_DNS_SRV
# endif
#else #else
#undef USE_DNS_SRV # include "curl-shim.h"
#endif
#else
#include "curl-shim.h"
#endif #endif
#include "util.h" #include "util.h"
#ifdef USE_DNS_SRV #ifdef USE_DNS_SRV
#include "srv.h" # include "srv.h"
#endif #endif
#include "keyserver.h" #include "keyserver.h"
#include "ksutil.h" #include "ksutil.h"
@ -73,9 +74,10 @@ static char errorbuffer[CURL_ERROR_SIZE];
static char *proto,*port; static char *proto,*port;
static size_t static size_t
curl_mrindex_writer(const void *ptr,size_t size,size_t nmemb,void *stream) curl_mrindex_writer (const void *ptr,size_t size,size_t nmemb,void *stream)
{ {
static int checked=0,swallow=0; static int checked = 0;
static int swallow = 0;
if(!checked) if(!checked)
{ {