shithub: opusfile

Download patch

ref: 27c8948abf0c92102355d86c2ad7c35a53a2c6e4
parent: 50ee9e309cf15deddfbe0a8dcb8112900282d76d
author: Timothy B. Terriberry <tterribe@xiph.org>
date: Wed Feb 27 17:56:19 EST 2013

More minor win32 cleanups.

Just normalizing coding style.

--- a/src/http.c
+++ b/src/http.c
@@ -707,7 +707,7 @@
   char             service[6];
   memset(&hints,0,sizeof(hints));
   hints.ai_socktype=SOCK_STREAM;
-#ifndef _WIN32
+#if !defined(_WIN32)
   hints.ai_flags=AI_NUMERICSERV;
 #endif
   OP_ASSERT(_port<=65535U);
@@ -747,13 +747,11 @@
 # endif
 }
 
-#ifdef _WIN32
+#if defined(_WIN32)
 static void op_init_winsock(){
-  static LONG count = 0;
+  static LONG    count;
   static WSADATA wsadata;
-  if (InterlockedIncrement(&count) == 1) {
-    WSAStartup(0x0202, &wsadata);
-  }
+  if(InterlockedIncrement(&count)==1)WSAStartup(0x0202,&wsadata);
 }
 #endif
 
@@ -2143,7 +2141,7 @@
      out that last_host!=NULL implies we've already taken one trip through the
      loop.*/
   last_port=0;
-#ifdef _WIN32
+#if defined(_WIN32)
   op_init_winsock();
 #endif
   ret=op_parse_url(&_stream->url,_url);