summaryrefslogtreecommitdiff
path: root/server/uloc.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-06-15 19:16:26 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-06-15 19:16:26 +0000
commit85fcbaa19fbdb7ac671a6857864051d5b2c666e1 (patch)
treea78101caacea53c57bc0ea8be80f57c6c348d121 /server/uloc.c
parent03789ad4d6937746e0cacc9d930101069aed2829 (diff)
found is a pointer, not an int
Diffstat (limited to 'server/uloc.c')
-rw-r--r--server/uloc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/uloc.c b/server/uloc.c
index ca375fa..abcf560 100644
--- a/server/uloc.c
+++ b/server/uloc.c
@@ -1052,6 +1052,7 @@ struct sockaddr_in *who;
{
char **answer;
int found;
+ Code_t retval;
#if defined(NEW_COMPAT) || defined(OLD_COMPAT)
if (!strcmp(notice->z_version, NEW_OLD_ZEPHYR_VERSION) ||
@@ -1150,17 +1151,17 @@ register int *found;
#ifdef DEBUG
if (zdebug) {
- for (i = 0; i < found ; i++)
+ for (i = 0; i < *found ; i++)
zdbug((LOG_DEBUG,"found %s", matches[i]->zlt_user));
}
#endif DEBUG
/* coalesce the location information into a list of char *'s */
- if ((answer = (char **) xmalloc(found * NUM_FIELDS * sizeof(char *))) == (char **) 0) {
+ if ((answer = (char **)xmalloc((*found) * NUM_FIELDS * sizeof(char *))) == (char **) 0) {
syslog(LOG_ERR, "zloc no mem(answer)");
- found = 0;
+ *found = 0;
} else
- for (i = 0; i < found ; i++) {
+ for (i = 0; i < *found ; i++) {
answer[i*NUM_FIELDS] = matches[i]->zlt_machine;
answer[i*NUM_FIELDS + 1] = matches[i]->zlt_time;
answer[i*NUM_FIELDS + 2] = matches[i]->zlt_tty;