From 05e782ddd3dc58245c889529bb8aeeaddf24bf71 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Thu, 1 Feb 2001 16:49:30 +0000 Subject: Fix wget error message and add (and use) chomp library function. --- sed.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sed.c') diff --git a/sed.c b/sed.c index e0351c3b8..0ce9f45e0 100644 --- a/sed.c +++ b/sed.c @@ -436,8 +436,7 @@ static void load_cmd_file(char *filename) } /* eat trailing newline (if any) --if I don't do this, edit commands * (aic) will print an extra newline */ - if (line[strlen(line)-1] == '\n') - line[strlen(line)-1] = 0; + chomp(line); add_cmd_str(line); free(line); } -- cgit v1.2.3