aboutsummaryrefslogtreecommitdiff
path: root/nis/nis_call.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_call.c')
-rw-r--r--nis/nis_call.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nis/nis_call.c b/nis/nis_call.c
index ff9e768..a2bbdb5 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -484,9 +484,10 @@ rec_dirsearch (const_nis_name name, directory_obj *dir, u_long flags,
case LOWER_NAME:
{
directory_obj *obj;
- char leaf [strlen (name) + 3];
- char domain [strlen (name) + 3];
- char ndomain [strlen (name) + 3];
+ size_t namelen = strlen (name);
+ char leaf [namelen + 3];
+ char domain [namelen + 3];
+ char ndomain [namelen + 3];
char *cp;
u_int run = 0;
@@ -494,7 +495,7 @@ rec_dirsearch (const_nis_name name, directory_obj *dir, u_long flags,
do
{
- if (strlen (domain) == 0)
+ if (domain[0] == '\0')
{
nis_free_directory (dir);
return NULL;