]> Savannah Git Hosting - gnulib.git/commitdiff
getusershell: Don't completely ignore lines that contain a comment.
authorBruno Haible <bruno@clisp.org>
Tue, 27 Aug 2024 20:17:18 +0000 (22:17 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 27 Aug 2024 20:17:18 +0000 (22:17 +0200)
* lib/getusershell.c (getusershell): Truncate the line where a comment
starts, instead of ignoring the line entirely.

ChangeLog
lib/getusershell.c

index 51e78323e0b77c00423b7b246e3b078539d42ec2..9ffb43fd6b18fa22f0a859a07bae221c88fa9f74 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-27  Bruno Haible  <bruno@clisp.org>
+
+       getusershell: Don't completely ignore lines that contain a comment.
+       * lib/getusershell.c (getusershell): Truncate the line where a comment
+       starts, instead of ignoring the line entirely.
+
 2024-08-27  Bruno Haible  <bruno@clisp.org>
 
        fts: Don't assume that a pointer is as wide as a 'long'.
index 356b8023d5ed685f25f2463003648db0f129543b..817318327b379f842ced842a0c89762c7ac72197 100644 (file)
@@ -112,7 +112,7 @@ getusershell (void)
           if (comment != NULL)
             {
               /* Trim the comment mark.  */
-              comment = '\0';
+              *comment = '\0';
               end = comment;
             }
           else