diff options
-rw-r--r-- | apps/plugin.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 62bc4cfde7..edf32d227d 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -378,14 +378,10 @@ int codec_load_file(const char *plugin, void *parameter) | |||
378 | return fd; | 378 | return fd; |
379 | } | 379 | } |
380 | 380 | ||
381 | plugin_size = 0; | 381 | rc = read(fd, &pluginbuf[0], PLUGIN_BUFFER_SIZE); |
382 | 382 | if (rc <= 0) | |
383 | do { | 383 | return PLUGIN_ERROR; |
384 | rc = read(fd, &pluginbuf[0], PLUGIN_BUFFER_SIZE); | 384 | plugin_size = rc; |
385 | if (rc < 0) | ||
386 | return PLUGIN_ERROR; | ||
387 | plugin_size += rc; | ||
388 | } while (rc > 0) ; | ||
389 | close(fd); | 385 | close(fd); |
390 | 386 | ||
391 | return codec_load_ram(pluginbuf, plugin_size, parameter, NULL, 0); | 387 | return codec_load_ram(pluginbuf, plugin_size, parameter, NULL, 0); |