1
0
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:
dan
2000-11-24 10:31:10 +00:00
parent a9b75e03e2
commit ad95610321
3 changed files with 29 additions and 53 deletions

View File

@@ -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) {