version: reduce memory manipulation by using file descriptors
modified src/version.c
@@ -1,5 +1,5 @@
|
|
| - | |
| + | |
|
|
|
|
|
@@ -597,7 +597,7 @@ exec_buf(xstring *res, char **argv) {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -605,10 +605,11 @@ category_new(char *categorypath, const char *category)
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -635,11 +636,10 @@ cleanup:
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -647,16 +647,13 @@ validate_origin(const char *portsdir, const char *origin)
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
| - | |
| - | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -670,8 +667,7 @@ validate_origin(const char *portsdir, const char *origin)
|
|
|
|
|
|
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -681,13 +677,10 @@ port_version(xstring *cmd, const char *portsdir, const char *origin,
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -723,14 +716,16 @@ do_source_ports(unsigned int opt, char limchar, char *pattern, match_t match,
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -761,7 +756,7 @@ do_source_ports(unsigned int opt, char limchar, char *pattern, match_t match,
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|