1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -31,72 +31,70 @@ namespace
{
void usage()
{
cout << "usage: cplogger [-s subsys] [-cwi] [-h] msg_id [args...]" << endl;
}
cout << "usage: cplogger [-s subsys] [-cwi] [-h] msg_id [args...]" << endl;
}
} // namespace
int main(int argc, char** argv)
{
int c;
opterr = 0;
bool cflg = true;
bool wflg = false;
unsigned subsysID = 8; //oamcpp
int c;
opterr = 0;
bool cflg = true;
bool wflg = false;
unsigned subsysID = 8; // oamcpp
while ((c = getopt(argc, argv, "s:cwih")) != EOF)
switch (c)
{
case 'c':
cflg = true;
wflg = false;
break;
case 'w':
cflg = false;
wflg = true;
break;
case 'i':
cflg = false;
wflg = false;
break;
case 's':
subsysID = strtoul(optarg, 0, 0);
break;
case 'h':
case '?':
default:
usage();
return (c == 'h' ? 0 : 1);
break;
}
if ((argc - optind) < 1)
while ((c = getopt(argc, argv, "s:cwih")) != EOF)
switch (c)
{
case 'c':
cflg = true;
wflg = false;
break;
case 'w':
cflg = false;
wflg = true;
break;
case 'i':
cflg = false;
wflg = false;
break;
case 's': subsysID = strtoul(optarg, 0, 0); break;
case 'h':
case '?':
default:
usage();
return 1;
return (c == 'h' ? 0 : 1);
break;
}
Message::MessageID mid = strtoul(argv[optind++], 0, 0);;
Message::Args args;
if ((argc - optind) < 1)
{
usage();
return 1;
}
for (int i = optind; i < argc; i++)
args.add(argv[optind++]);
Message::MessageID mid = strtoul(argv[optind++], 0, 0);
;
Message::Args args;
LoggingID logInfo(subsysID);
Message msg(mid);
msg.format(args);
MessageLog log(logInfo);
for (int i = optind; i < argc; i++)
args.add(argv[optind++]);
if (cflg)
log.logCriticalMessage(msg);
else if (wflg)
log.logWarningMessage(msg);
else
log.logInfoMessage(msg);
LoggingID logInfo(subsysID);
Message msg(mid);
msg.format(args);
MessageLog log(logInfo);
return 0;
if (cflg)
log.logCriticalMessage(msg);
else if (wflg)
log.logWarningMessage(msg);
else
log.logInfoMessage(msg);
return 0;
}