summary refs log tree commit diff
path: root/nis/nis_defaults.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_defaults.c')
-rw-r--r--nis/nis_defaults.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/nis/nis_defaults.c b/nis/nis_defaults.c
index 9d152d1f11..53a585b516 100644
--- a/nis/nis_defaults.c
+++ b/nis/nis_defaults.c
@@ -46,11 +46,9 @@ searchgroup (char *str)
   while (cptr[i] != '\0' && cptr[i] != ':')
     i++;
   if (i == 0)			/* only "group=" ? */
-    return (nis_name)"";
-
-  strncpy (default_group, cptr, i);
+    return (nis_name) "";
 
-  return default_group;
+  return strncpy (default_group, cptr, i);
 }
 
 static nis_name
@@ -71,9 +69,7 @@ searchowner (char *str)
   if (i == 0)			/* only "owner=" ? */
     return (nis_name)"";
 
-  strncpy (default_owner, cptr, i);
-
-  return default_owner;
+  return strncpy (default_owner, cptr, i);
 }
 
 static u_long