mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
simplify -description methods and improve warning logs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28622 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
826cd93801
commit
14a28f5b7c
3 changed files with 16 additions and 21 deletions
|
@ -1803,13 +1803,10 @@ static Class tcpPortClass;
|
|||
- (NSString*) description
|
||||
{
|
||||
NSString *desc;
|
||||
NSArray *names;
|
||||
|
||||
names = [[NSSocketPortNameServer sharedInstance] namesForPort: self];
|
||||
desc = [NSString stringWithFormat:
|
||||
@"<%s %p %@ on IP %@,%d>",
|
||||
@"<%s %p on IP %@,%d>",
|
||||
GSClassNameFromObject(self), self,
|
||||
(([names count] == 0) ? (id)@"(<un-named>)" : (id)names), host,
|
||||
((address == nil) ? (id)@"any" : (id)address), portNum];
|
||||
return desc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue