changeset 52132:4127c72e350b

(read-passwd): Use clear-string instead of fillarray.
author Richard M. Stallman <rms@gnu.org>
date Wed, 06 Aug 2003 01:05:15 +0000
parents 6be32b5661a6
children 4c112142c56f
files lisp/subr.el
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Wed Aug 06 01:04:34 2003 +0000
+++ b/lisp/subr.el	Wed Aug 06 01:05:15 2003 +0000
@@ -1180,10 +1180,10 @@
 		(second (read-passwd "Confirm password: " nil default)))
 	    (if (equal first second)
 		(progn
-		  (and (arrayp second) (fillarray second ?\0))
+		  (and (arrayp second) (clear-string second))
 		  (setq success first))
-	      (and (arrayp first) (fillarray first ?\0))
-	      (and (arrayp second) (fillarray second ?\0))
+	      (and (arrayp first) (clear-string first))
+	      (and (arrayp second) (clear-string second))
 	      (message "Password not repeated accurately; please start over")
 	      (sit-for 1))))
 	success)
@@ -1199,18 +1199,18 @@
 	(clear-this-command-keys)
 	(if (= c ?\C-u)
 	    (progn
-	      (and (arrayp pass) (fillarray pass ?\0))
+	      (and (arrayp pass) (clear-string pass))
 	      (setq pass ""))
 	  (if (and (/= c ?\b) (/= c ?\177))
 	      (let* ((new-char (char-to-string c))
 		     (new-pass (concat pass new-char)))
-		(and (arrayp pass) (fillarray pass ?\0))
-		(fillarray new-char ?\0)
+		(and (arrayp pass) (clear-string pass))
+		(clear-string new-char)
 		(setq c ?\0)
 		(setq pass new-pass))
 	    (if (> (length pass) 0)
 		(let ((new-pass (substring pass 0 -1)))
-		  (and (arrayp pass) (fillarray pass ?\0))
+		  (and (arrayp pass) (clear-string pass))
 		  (setq pass new-pass))))))
       (message nil)
       (or pass default ""))))