summaryrefslogtreecommitdiff
path: root/udevinitsend.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-07-07 16:02:03 +0200
committerKay Sievers <kay.sievers@suse.de>2005-07-07 16:02:03 +0200
commit5f79d72c436e9433080feff93be965ec79b17ec2 (patch)
treed7a3e79a0f03633b411a26f9f11cd45d40668235 /udevinitsend.c
parenta82f23bf96bf6e05ae7e986678f411dfa2ad65cc (diff)
fix unquoted strings in udevinitsend
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udevinitsend.c')
-rw-r--r--udevinitsend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/udevinitsend.c b/udevinitsend.c
index 26ae5c8418..204e9cecd5 100644
--- a/udevinitsend.c
+++ b/udevinitsend.c
@@ -132,11 +132,11 @@ static int udevsend(char *filename, int sock, int disable_loop_detection)
strncpy(&usend_msg.envbuf[bufpos],ls,(ch - ls) + 1);
bufpos += (ch - ls) + 1;
if (ch[1] == '\'' && le[-1] == '\'') {
- strncpy(&usend_msg.envbuf[bufpos],ch + 2, (le - ch) -3);
+ strncpy(&usend_msg.envbuf[bufpos],ch + 2, (le - ch) - 3);
bufpos += (le - ch) - 3;
} else {
- strncpy(&usend_msg.envbuf[bufpos],ch, (le - ch));
- bufpos += (le - ch);
+ strncpy(&usend_msg.envbuf[bufpos],ch + 1, (le - ch) - 1);
+ bufpos += (le - ch) - 1;
}
bufpos++;
}