From 644ec85d801e17f38b8917b2822e611db97a1979 Mon Sep 17 00:00:00 2001
From: Darko Poljak <darko.poljak@gmail.com>
Date: Fri, 5 Oct 2018 12:50:01 +0200
Subject: [PATCH] Fix SC2162.

---
 cdist/conf/type/__rsync/gencode-local               | 2 +-
 cdist/conf/type/__ssh_authorized_key/gencode-remote | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cdist/conf/type/__rsync/gencode-local b/cdist/conf/type/__rsync/gencode-local
index c7196175..e36ded2f 100755
--- a/cdist/conf/type/__rsync/gencode-local
+++ b/cdist/conf/type/__rsync/gencode-local
@@ -29,7 +29,7 @@ fi
 
 set --
 if [ -f "$__object/parameter/rsync-opts" ]; then
-    while read opts; do
+    while read -r opts; do
         set -- "$@" "--$opts"
     done < "$__object/parameter/rsync-opts"
 fi
diff --git a/cdist/conf/type/__ssh_authorized_key/gencode-remote b/cdist/conf/type/__ssh_authorized_key/gencode-remote
index 325854c2..82c90d61 100755
--- a/cdist/conf/type/__ssh_authorized_key/gencode-remote
+++ b/cdist/conf/type/__ssh_authorized_key/gencode-remote
@@ -78,7 +78,7 @@ if [ -s "$__object/explorer/entry" ]; then
    # Note that the files have to be sorted for comparison with `comm`.
    sort "$__object/explorer/entry" > "$__object/files/is"
    comm -13 "$__object/files/should" "$__object/files/is" | {
-      while read entry; do
+      while read -r entry; do
          remove_line "$file" "$entry"
       done
    }