summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2003-08-06 01:05:15 +0000
committerRichard M. Stallman <rms@gnu.org>2003-08-06 01:05:15 +0000
commitf0491f768e2163216ca93f980156d1f740e250d8 (patch)
tree45f0f2c9808e6ca23f02ff7693911abb74ba4b7b /lisp/subr.el
parent7725f0fb6c13c948250e03b8e4fc13b966fc3ae8 (diff)
downloademacs-f0491f768e2163216ca93f980156d1f740e250d8.tar.gz
(read-passwd): Use clear-string instead of fillarray.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 67b9360f077..78d3a755f14 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1180,10 +1180,10 @@ Optional DEFAULT is a default password to use instead of empty input."
(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 @@ Optional DEFAULT is a default password to use instead of empty input."
(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 ""))))