diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-05-20 01:38:42 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-05-20 01:38:42 +0200 |
commit | f4ae8b7691ea9fc80baedd68d0b3606f1c6fed46 (patch) | |
tree | e46812edaf26ce2b64d021c182f3e8a67f435dda /sql/mysql_upgrade_service.cc | |
parent | 4ea53bc29b1e3069ba72720412016e01b7d7382c (diff) | |
download | mariadb-git-f4ae8b7691ea9fc80baedd68d0b3606f1c6fed46.tar.gz |
- Properly terminate options array with all-zero entry.
- Fix CRLF end of lines, use LF instead
Diffstat (limited to 'sql/mysql_upgrade_service.cc')
-rw-r--r-- | sql/mysql_upgrade_service.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/mysql_upgrade_service.cc b/sql/mysql_upgrade_service.cc index 68d97936e7d..db916101eb1 100644 --- a/sql/mysql_upgrade_service.cc +++ b/sql/mysql_upgrade_service.cc @@ -67,6 +67,7 @@ static struct my_option my_long_options[]= NO_ARG, 0, 0, 0, 0, 0, 0}, {"service", 'S', "Name of the existing Windows service", &opt_service, &opt_service, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; @@ -96,7 +97,7 @@ static void log(const char *fmt, ...) va_start(args, fmt); vfprintf(stdout,fmt, args); va_end(args); - fputc('\n', stdout);
+ fputc('\n', stdout); fflush(stdout); } @@ -117,13 +118,13 @@ static void die(const char *fmt, ...) logfile_path); } va_end(args); - fputc('\n', stderr);
+ fputc('\n', stderr); fflush(stdout); /* Cleanup */ - /*
- Stop service that we started, if it was not initally running at
- program start.
+ /* + Stop service that we started, if it was not initally running at + program start. */ if (initial_service_state != -1 && initial_service_state != SERVICE_RUNNING) { |