aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/process.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c
index 3d4ecb82b08..3091dd99822 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2635,13 +2635,7 @@ conv_sockaddr_to_lisp (struct sockaddr *sa, ptrdiff_t len)
2635 to walk past the end of the object looking for the name 2635 to walk past the end of the object looking for the name
2636 terminator, however. */ 2636 terminator, however. */
2637 if (name_length > 0 && sockun->sun_path[0] != '\0') 2637 if (name_length > 0 && sockun->sun_path[0] != '\0')
2638 { 2638 name_length = strnlen (sockun->sun_path, name_length);
2639 const char *terminator
2640 = memchr (sockun->sun_path, '\0', name_length);
2641
2642 if (terminator)
2643 name_length = terminator - (const char *) sockun->sun_path;
2644 }
2645 2639
2646 return make_unibyte_string (sockun->sun_path, name_length); 2640 return make_unibyte_string (sockun->sun_path, name_length);
2647 } 2641 }