- Fixed error codes. Negative when needed (SSL error codes). Non-negative if error-codes are OR'ed to other error codes (ASN1, Base64, MPI, DHM). The rest is negative by default. 

diff --git a/include/polarssl/net.h b/include/polarssl/net.h
index 29d6661..eff53cb 100644
--- a/include/polarssl/net.h
+++ b/include/polarssl/net.h
@@ -23,16 +23,16 @@
 #ifndef POLARSSL_NET_H
 #define POLARSSL_NET_H
 
-#define POLARSSL_ERR_NET_UNKNOWN_HOST                      0x0F00
-#define POLARSSL_ERR_NET_SOCKET_FAILED                     0x0F10
-#define POLARSSL_ERR_NET_CONNECT_FAILED                    0x0F20
-#define POLARSSL_ERR_NET_BIND_FAILED                       0x0F30
-#define POLARSSL_ERR_NET_LISTEN_FAILED                     0x0F40
-#define POLARSSL_ERR_NET_ACCEPT_FAILED                     0x0F50
-#define POLARSSL_ERR_NET_RECV_FAILED                       0x0F60
-#define POLARSSL_ERR_NET_SEND_FAILED                       0x0F70
-#define POLARSSL_ERR_NET_CONN_RESET                        0x0F80
-#define POLARSSL_ERR_NET_TRY_AGAIN                         0x0F90
+#define POLARSSL_ERR_NET_UNKNOWN_HOST                      -0x0F00
+#define POLARSSL_ERR_NET_SOCKET_FAILED                     -0x0F10
+#define POLARSSL_ERR_NET_CONNECT_FAILED                    -0x0F20
+#define POLARSSL_ERR_NET_BIND_FAILED                       -0x0F30
+#define POLARSSL_ERR_NET_LISTEN_FAILED                     -0x0F40
+#define POLARSSL_ERR_NET_ACCEPT_FAILED                     -0x0F50
+#define POLARSSL_ERR_NET_RECV_FAILED                       -0x0F60
+#define POLARSSL_ERR_NET_SEND_FAILED                       -0x0F70
+#define POLARSSL_ERR_NET_CONN_RESET                        -0x0F80
+#define POLARSSL_ERR_NET_TRY_AGAIN                         -0x0F90
 
 #ifdef __cplusplus
 extern "C" {