mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-29 11:35:47 +01:00
- removed calls to wsyserror() and wwarning() inside the WMHost and
WMConnection code. do call by yourself wsyserrorwithcode() passing WCErrorCode, whenever a call don't return the expected value, and WCErrorCode > 0. If WCErrorCode==0 that is not an system error, condition, so don't call wsyserrorwithcode() in that case. - added some assertions where appropriate
This commit is contained in:
12
WINGs/host.c
12
WINGs/host.c
@@ -115,7 +115,7 @@ WMGetCurrentHost()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name[W_MAXHOSTNAMELEN] = '\0';
|
||||
name[W_MAXHOSTNAMELEN] = 0;
|
||||
|
||||
return WMGetHostWithName(name);
|
||||
}
|
||||
@@ -127,10 +127,7 @@ WMGetHostWithName(char *name)
|
||||
struct hostent *host;
|
||||
WMHost *hPtr;
|
||||
|
||||
if (name == NULL) {
|
||||
wwarning("NULL host name in 'WMGetHostWithName()'");
|
||||
return NULL;
|
||||
}
|
||||
wassertrv(name!=NULL, NULL);
|
||||
|
||||
if (hostCacheEnabled) {
|
||||
if ((hPtr = getHostFromCache(name)) != NULL) {
|
||||
@@ -157,10 +154,7 @@ WMGetHostWithAddress(char *address)
|
||||
struct in_addr in;
|
||||
WMHost *hPtr;
|
||||
|
||||
if (address == NULL) {
|
||||
wwarning("NULL address in 'WMGetHostWithAddress()'");
|
||||
return NULL;
|
||||
}
|
||||
wassertrv(address!=NULL, NULL);
|
||||
|
||||
if (hostCacheEnabled) {
|
||||
if ((hPtr = getHostFromCache(address)) != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user