Hello, Just a tiny cleanup, ports are always shorts, so no need to make it an int. It also makes the structure SocketData 4 bytes smaller because of less padding. Greetings, Indan diff -purN orig/src/IO/http.c https/src/IO/http.c --- orig/src/IO/http.c 2003-11-11 22:15:39.000000000 +0100 +++ https/src/IO/http.c 2003-11-15 18:26:01.000000000 +0100 @@ -58,7 +58,7 @@ G_STMT_START { typedef struct { gint SockFD; const DilloUrl *Url; /* reference to original URL */ - guint port; /* need a separate port in order to support PROXY */ + gushort port; /* need a separate port in order to support PROXY */ gboolean use_proxy; /* indicates whether to use proxy or not */ DilloWeb *web; /* reference to client's web structure */ GSList *addr_list; /* Holds the DNS answer */
Am Sat, Nov 15, 2003 at 07:09:43PM +0100 schrieb Indan Zupancic und sprach:
Hello,
Just a tiny cleanup, ports are always shorts, so no need to make it an int. It also makes the structure SocketData 4 bytes smaller because of less padding.
diff -purN orig/src/IO/http.c https/src/IO/http.c --- orig/src/IO/http.c 2003-11-11 22:15:39.000000000 +0100 +++ https/src/IO/http.c 2003-11-15 18:26:01.000000000 +0100 @@ -58,7 +58,7 @@ G_STMT_START { typedef struct { gint SockFD; const DilloUrl *Url; /* reference to original URL */ - guint port; /* need a separate port in order to support PROXY */ + gushort port; /* need a separate port in order to support PROXY */ gboolean use_proxy; /* indicates whether to use proxy or not */ DilloWeb *web; /* reference to client's web structure */ GSList *addr_list; /* Holds the DNS answer */
What about the port in DilloUrl then? Stephan
What about the port in DilloUrl then?
A port is always a unsigned short, can store it as an int if you want, but doesn't make much sense. I only looked at Dillo's IO code, so didn't notice the one in DilloUrl. It's really not very important, but in the case of SocketData it at least makes the structure smaller, DilloUrl stays the same size. Greetings, Indan
participants (2)
-
Indan Zupancic
-
Stephan Goetter