diff options
Diffstat (limited to 'plugins/runcmd.c')
| -rw-r--r-- | plugins/runcmd.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/plugins/runcmd.c b/plugins/runcmd.c index 7c583b85..be6691d2 100644 --- a/plugins/runcmd.c +++ b/plugins/runcmd.c | |||
| @@ -300,7 +300,6 @@ static int np_fetch_output(int fd, output *op, int flags) { | |||
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | op->line = NULL; | 302 | op->line = NULL; |
| 303 | op->lens = NULL; | ||
| 304 | i = 0; | 303 | i = 0; |
| 305 | while (i < op->buflen) { | 304 | while (i < op->buflen) { |
| 306 | /* make sure we have enough memory */ | 305 | /* make sure we have enough memory */ |
| @@ -311,7 +310,6 @@ static int np_fetch_output(int fd, output *op, int flags) { | |||
| 311 | } while (!ary_size); | 310 | } while (!ary_size); |
| 312 | 311 | ||
| 313 | op->line = realloc(op->line, ary_size * sizeof(char *)); | 312 | op->line = realloc(op->line, ary_size * sizeof(char *)); |
| 314 | op->lens = realloc(op->lens, ary_size * sizeof(size_t)); | ||
| 315 | } | 313 | } |
| 316 | 314 | ||
| 317 | /* set the pointer to the string */ | 315 | /* set the pointer to the string */ |
| @@ -323,9 +321,6 @@ static int np_fetch_output(int fd, output *op, int flags) { | |||
| 323 | } | 321 | } |
| 324 | buf[i] = '\0'; | 322 | buf[i] = '\0'; |
| 325 | 323 | ||
| 326 | /* calculate the string length using pointer difference */ | ||
| 327 | op->lens[lineno] = (size_t)&buf[i] - (size_t)op->line[lineno]; | ||
| 328 | |||
| 329 | lineno++; | 324 | lineno++; |
| 330 | i++; | 325 | i++; |
| 331 | } | 326 | } |
