View | Details | Raw Unified | Return to bug 637490
Collapse All | Expand All

(-) (-3 / +4 lines)
Line  Link Here
-- netstat.c
Lines 899-906 static void tcp_do_one(int lnr, const ch Link Here
899
	snprintf(buffer, sizeof(buffer), "%s",
899
	snprintf(buffer, sizeof(buffer), "%s",
900
		 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
900
		 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
901
901
902
	if ((strlen(rem_addr) + strlen(buffer)) > 22)
902
	if (!flag_trim) {
903
	    rem_addr[22 - strlen(buffer)] = '\0';
903
		if ((strlen(rem_addr) + strlen(buffer)) > 22)
904
		    rem_addr[22 - strlen(buffer)] = '\0';
905
	}
904
906
905
	strcat(rem_addr, ":");
907
	strcat(rem_addr, ":");
906
	strcat(rem_addr, buffer);
908
	strcat(rem_addr, buffer);

Return to bug 637490