Fix a bunch of uses of 'short'.

(In particular, port numbers should be unsigned short.)

Change-Id: I944eb0f8e97390f1af8094b07ee7f2a00045bd35
diff --git a/jdwpspy/Common.h b/jdwpspy/Common.h
index ddaba9c..f942dee 100644
--- a/jdwpspy/Common.h
+++ b/jdwpspy/Common.h
@@ -6,13 +6,14 @@
 #ifndef _JDWPSPY_COMMON
 #define _JDWPSPY_COMMON
 
+#include <stdint.h>
 #include <stdio.h>
 #include <sys/types.h>
 
-typedef unsigned char u1;
-typedef unsigned short u2;
-typedef unsigned int u4;
-typedef unsigned long long u8;
+typedef uint8_t u1;
+typedef uint16_t u2;
+typedef uint32_t u4;
+typedef uint64_t u8;
 
 #define NELEM(x) (sizeof(x) / sizeof((x)[0]))
 
diff --git a/jdwpspy/Net.cpp b/jdwpspy/Net.cpp
index eea21c8..209cf28 100644
--- a/jdwpspy/Net.cpp
+++ b/jdwpspy/Net.cpp
@@ -53,7 +53,7 @@
 
     /* connect here to contact VM */
     struct in_addr vmAddr;
-    short   vmPort;
+    uint16_t vmPort;
 
     Peer    dbg;
     Peer    vm;
@@ -227,9 +227,7 @@
  *
  * Returns 0 on success.
  */
-NetState* jdwpNetStartup(unsigned short listenPort, const char* connectHost,
-    unsigned short connectPort)
-{
+NetState* jdwpNetStartup(uint16_t listenPort, const char* connectHost, uint16_t connectPort) {
     NetState* netState = new NetState;
     memset(netState, 0, sizeof(*netState));
     netState->listenSock = -1;