summaryrefslogtreecommitdiffstats
path: root/util.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-08-28 14:44:06 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-08-28 14:44:06 -0400
commit30f926f0b0a198dd416ea735353e852a7ee79d69 (patch)
tree7c924e8de6a9a38ee904d9793f0bafffc00b8d85 /util.cxx
parentfb84c077272764f8cb000e9b02572fb7c9cac24f (diff)
parent84f00e279d98edba986225386c7183db3c5968b0 (diff)
downloadsystemtap-steved-30f926f0b0a198dd416ea735353e852a7ee79d69.tar.gz
systemtap-steved-30f926f0b0a198dd416ea735353e852a7ee79d69.tar.xz
systemtap-steved-30f926f0b0a198dd416ea735353e852a7ee79d69.zip
Merge commit 'origin/master' into pr4225
* commit 'origin/master': PR5686: correct regression in semok/optimize.stp trailing whitespace removal, as approved by emacs fix global-var array index rendering fix NEWS to refer to simpler context.stp tapset functions in auto-printing blurb Document written but unread global variable automatic display. 2nd try initial Make _get_sock_addr return correct address in kernel before 2.6.16. Automatically print written but unread globals Make nodwf test passed when CONFIG_QUOTACTL unset Uses STAPCONF_DPATH_PATH instead of a kernel version check. Simplified "rpm" target a bit. Moved tar archive creation step from "rpm" target to "dist-gzip" target. remove support for "make dist" since git-archive does as well; Examples html files moved into subdir. 2008-08-25 David Smith <dsmith@redhat.com> ChangeLog Entries Robustness improvements for the stap client/server
Diffstat (limited to 'util.cxx')
-rw-r--r--util.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/util.cxx b/util.cxx
index ab0a1a91..a5f77c06 100644
--- a/util.cxx
+++ b/util.cxx
@@ -179,13 +179,13 @@ string find_executable(const string& name)
// Split PATH up.
vector<string> dirs;
tokenize(string(path), dirs, string(":"));
-
+
// Search the path looking for the first executable of the right name.
for (vector<string>::iterator i = dirs.begin(); i != dirs.end(); i++)
{
string fname = *i + "/" + name;
const char *f = fname.c_str();
-
+
// Look for a normal executable file.
if (access(f, X_OK) == 0
&& stat(f, &st) == 0
@@ -198,7 +198,7 @@ string find_executable(const string& name)
}
}
-
+
// Could not find the program on the $PATH. We'll just fall back to
// the unqualified name, which our caller will probably fail with.
if (retpath == "")
@@ -206,8 +206,8 @@ string find_executable(const string& name)
// Canonicalize the path name.
char *cf = canonicalize_file_name (retpath.c_str());
- if (cf)
- {
+ if (cf)
+ {
retpath = string(cf);
free (cf);
}
@@ -234,8 +234,8 @@ const string cmdstr_quoted(const string& cmd)
string::size_type pos = 0;
quoted_cmd += quote;
- for (string::size_type quote_pos = cmd.find(quote, pos);
- quote_pos != string::npos;
+ for (string::size_type quote_pos = cmd.find(quote, pos);
+ quote_pos != string::npos;
quote_pos = cmd.find(quote, pos)) {
quoted_cmd += cmd.substr(pos, quote_pos - pos);
quoted_cmd += replace;