aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-21 17:49:10 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-21 17:49:10 -0300
commitd84a6b90a34add17a7fc92ded5aba519569ee1d1 (patch)
treef895b8b1c98629226809bd89e87f3025b588a5ee /src
parent2c5a64864f15f3607abf8ae6e1ef02c28bf3144b (diff)
downloadblogc-d84a6b90a34add17a7fc92ded5aba519569ee1d1.tar.gz
blogc-d84a6b90a34add17a7fc92ded5aba519569ee1d1.tar.bz2
blogc-d84a6b90a34add17a7fc92ded5aba519569ee1d1.zip
no need to use strndup
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index ea4c714..27b4fef 100644
--- a/src/main.c
+++ b/src/main.c
@@ -112,13 +112,13 @@ main(int argc, char **argv)
break;
case 't':
if (argv[i][2] != '\0')
- template = b_strndup(argv[i] + 2, strlen(argv[i]) - 2);
+ template = b_strdup(argv[i] + 2);
else if (i + 1 < argc)
template = b_strdup(argv[++i]);
break;
case 'o':
if (argv[i][2] != '\0')
- output = b_strndup(argv[i] + 2, strlen(argv[i]) - 2);
+ output = b_strdup(argv[i] + 2);
else if (i + 1 < argc)
output = b_strdup(argv[++i]);
break;