mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
mdev-helper: formatting code using astyle
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2d89243899
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-07-05 (Mon, 05 Jul 2021)
Origin message was:
------------------
- mdev-helper: formatting code using astyle
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -64,13 +64,15 @@ int main (int /*argc*/, char **argv)
|
|||||||
goto _error;
|
goto _error;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned i = 0; mdev_env[i]; i++) {
|
for (unsigned i = 0; mdev_env[i]; i++)
|
||||||
|
{
|
||||||
char *s = getenv(mdev_env[i]);
|
char *s = getenv(mdev_env[i]);
|
||||||
if (s)
|
if (s)
|
||||||
data += std::string(mdev_env[i]) + "=" + s + " ";
|
data += std::string(mdev_env[i]) + "=" + s + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.empty()) {
|
if (data.empty())
|
||||||
|
{
|
||||||
printf("%s: env data empty\n", argv[0]);
|
printf("%s: env data empty\n", argv[0]);
|
||||||
goto _error;
|
goto _error;
|
||||||
}
|
}
|
||||||
@@ -81,12 +83,14 @@ int main (int /*argc*/, char **argv)
|
|||||||
head.initiatorID = CEventServer::INITID_NEUTRINO;
|
head.initiatorID = CEventServer::INITID_NEUTRINO;
|
||||||
head.dataSize = data.size() + 1;
|
head.dataSize = data.size() + 1;
|
||||||
|
|
||||||
if (write(sock_fd, &head, sizeof(head)) != sizeof(head)) {
|
if (write(sock_fd, &head, sizeof(head)) != sizeof(head))
|
||||||
|
{
|
||||||
perror("write event");
|
perror("write event");
|
||||||
goto _error;
|
goto _error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (write(sock_fd, data.c_str(), head.dataSize) != (ssize_t) head.dataSize) {
|
if (write(sock_fd, data.c_str(), head.dataSize) != (ssize_t) head.dataSize)
|
||||||
|
{
|
||||||
perror("write data");
|
perror("write data");
|
||||||
goto _error;
|
goto _error;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user