diff options
| author | Igor Pashev <pashev.igor@gmail.com> | 2012-04-16 23:24:10 +0400 |
|---|---|---|
| committer | Igor Pashev <pashev.igor@gmail.com> | 2012-04-16 23:24:10 +0400 |
| commit | 03b36d4aa2a8619cb7d2bcd5bc67923fa14293b8 (patch) | |
| tree | 41d799e3ac04b4c187dd6f5227eca8882b4ec3c6 | |
| parent | 4ac06171efaf6556659e3017fa8a73828c26c194 (diff) | |
| download | node-augeas-03b36d4aa2a8619cb7d2bcd5bc67923fa14293b8.tar.gz | |
We need only the number of matches
| -rw-r--r-- | libaugeas.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libaugeas.cc b/libaugeas.cc index 8797b85..9601d34 100644 --- a/libaugeas.cc +++ b/libaugeas.cc @@ -435,7 +435,6 @@ struct LoadFileUV { void blockingLoadFile(uv_work_t * req) { - char **matches; const char *val; int mres; LoadFileUV *lfuv = (LoadFileUV *) req->data; @@ -470,7 +469,7 @@ void blockingLoadFile(uv_work_t * req) } errPath = "/augeas/files" + lfuv->incl + "/error"; - mres = aug_match(lfuv->m_aug, errPath.c_str(), &matches); + mres = aug_match(lfuv->m_aug, errPath.c_str(), NULL); if (mres) { if (aug_get(lfuv->m_aug, std::string(errPath + "/line").c_str(), &val)) { @@ -481,7 +480,6 @@ void blockingLoadFile(uv_work_t * req) lfuv->msg = lfuv->msg + ": " + val; } lfuv->ret = -1; - free(matches); return; } @@ -600,7 +598,6 @@ struct SaveFileUV { void blockingSaveFile(uv_work_t * req) { - char **matches; const char *val; int mres; SaveFileUV *lfuv = (SaveFileUV *) req->data; @@ -611,7 +608,7 @@ void blockingSaveFile(uv_work_t * req) std::string lensVal = lfuv->lens + ".lns"; std::string filesPath = "/files" + lfuv->incl; - mres = aug_match(lfuv->m_aug, inclPath.c_str(), &matches); + mres = aug_match(lfuv->m_aug, inclPath.c_str(), NULL); if (!mres) { lfuv->ret = aug_set(lfuv->m_aug, lensPath.c_str(), lensVal.c_str()); @@ -639,7 +636,7 @@ void blockingSaveFile(uv_work_t * req) } errPath = "/augeas" + filesPath + "/error"; - mres = aug_match(lfuv->m_aug, errPath.c_str(), &matches); + mres = aug_match(lfuv->m_aug, errPath.c_str(), NULL); if (mres) { if (aug_get(lfuv->m_aug, std::string(errPath + "/line").c_str(), &val)) { @@ -650,7 +647,6 @@ void blockingSaveFile(uv_work_t * req) lfuv->msg = lfuv->msg + ": " + val; } lfuv->ret = -1; - free(matches); return; } } |
