summaryrefslogtreecommitdiff
path: root/zhm/zhm.c
diff options
context:
space:
mode:
authorGravatar David C. Jedlinsky <opus@mit.edu>1987-07-15 11:52:29 +0000
committerGravatar David C. Jedlinsky <opus@mit.edu>1987-07-15 11:52:29 +0000
commitdf43553e07e310df7f7ebb5adb4dea9c2ef2a3aa (patch)
tree376f2c1104a6e68ec08d3d994efb713abe6ba1b7 /zhm/zhm.c
parentc0fdae42b31be3fe5aabc94b74c9ab963f266525 (diff)
minor cleansing.
Diffstat (limited to 'zhm/zhm.c')
-rw-r--r--zhm/zhm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/zhm/zhm.c b/zhm/zhm.c
index 998f4ec..d510914 100644
--- a/zhm/zhm.c
+++ b/zhm/zhm.c
@@ -49,7 +49,10 @@ char *argv[];
Code_t ret;
/* Override server argument? */
- (void)gethostname(hostname, MAXHOSTNAMELEN);
+ if (gethostname(hostname, MAXHOSTNAMELEN) < 0) {
+ printf("Can't find my hostname?!\n");
+ exit(-1);
+ }
(void)strcpy(prim_serv, "");
if (argc > 1)
(void)strcpy(prim_serv, argv[1]);
@@ -121,7 +124,12 @@ void init_hm()
detach();
#endif DEBUG
- (void)ZInitialize();
+ if ((ret = ZInitialize()) != ZERR_NONE) {
+ Zperr(ret);
+ com_err("hm", ret, "initializing");
+ closelog();
+ exit(-1);
+ }
(void)ZSetServerState(1); /* Aargh!!! */
init_queue();
if ((serv_list = hes_resolve("zephyr", "sloc")) == (char **)NULL) {