4b03cb790c
reviewed ok Thanks OBS-URL: https://build.opensuse.org/request/show/61238 OBS-URL: https://build.opensuse.org/package/show/network:utilities/net-tools?expand=0&rev=25
16 lines
484 B
Diff
16 lines
484 B
Diff
--- netstat.c
|
|
+++ netstat.c 2011/02/15 11:22:47
|
|
@@ -899,8 +899,10 @@ static void tcp_do_one(int lnr, const ch
|
|
snprintf(buffer, sizeof(buffer), "%s",
|
|
get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
|
|
|
|
- if ((strlen(rem_addr) + strlen(buffer)) > 22)
|
|
- rem_addr[22 - strlen(buffer)] = '\0';
|
|
+ if (!flag_trim) {
|
|
+ if ((strlen(rem_addr) + strlen(buffer)) > 22)
|
|
+ rem_addr[22 - strlen(buffer)] = '\0';
|
|
+ }
|
|
|
|
strcat(rem_addr, ":");
|
|
strcat(rem_addr, buffer);
|