summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/instance_options.cc
diff options
context:
space:
mode:
authorunknown <petr@mysql.com>2005-02-13 15:13:33 +0300
committerunknown <petr@mysql.com>2005-02-13 15:13:33 +0300
commit5bd607785a1f72b826831ab45c99d75b69846531 (patch)
tree0416b3a77d516d448dfd5239dadc5bf9e7583bcc /server-tools/instance-manager/instance_options.cc
parentdce2554f9130920ab18e4e31432df7d6ca165ee0 (diff)
downloadmariadb-git-5bd607785a1f72b826831ab45c99d75b69846531.tar.gz
various fixes
server-tools/instance-manager/buffer.cc: use my_realloc instead of realloc server-tools/instance-manager/buffer.h: use my_malloc instead of malloc server-tools/instance-manager/commands.cc: No need to send a buffer if there were some error while writing to it server-tools/instance-manager/instance_options.cc: cleanup server-tools/instance-manager/manager.cc: check sigwait return value server-tools/instance-manager/parse_output.cc: fixed a bug, found with valgrind
Diffstat (limited to 'server-tools/instance-manager/instance_options.cc')
-rw-r--r--server-tools/instance-manager/instance_options.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/server-tools/instance-manager/instance_options.cc b/server-tools/instance-manager/instance_options.cc
index ab97c86316b..7c41a556cc4 100644
--- a/server-tools/instance-manager/instance_options.cc
+++ b/server-tools/instance-manager/instance_options.cc
@@ -80,9 +80,7 @@ void Instance_options::get_pid_filename(char *result)
char datadir[MAX_PATH_LEN];
if (mysqld_datadir == NULL)
- {
get_default_option(datadir, sizeof(datadir), "--datadir");
- }
else
strxnmov(datadir, MAX_PATH_LEN - 1, strchr(mysqld_datadir, '=') + 1,
"/", NullS);
@@ -106,8 +104,8 @@ pid_t Instance_options::get_pid()
FILE *pid_file_stream;
/* get the pid */
- if (pid_file_stream= my_fopen(pid_file_with_path,
- O_RDONLY | O_BINARY, MYF(0)))
+ if ((pid_file_stream= my_fopen(pid_file_with_path,
+ O_RDONLY | O_BINARY, MYF(0))) != NULL)
{
pid_t pid;