mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
intel_gpu_top: adopt to kernel coding style
This patch fixes adopts the code to the kernel coding_style.
This commit is contained in:
parent
a483c97d91
commit
b9d7c3a087
@ -454,8 +454,7 @@ int main(int argc, char **argv)
|
||||
char *cmd=NULL;
|
||||
|
||||
/* Parse options? */
|
||||
while ((ch = getopt(argc, argv, "s:o:e:h")) != -1)
|
||||
{
|
||||
while ((ch = getopt(argc, argv, "s:o:e:h")) != -1) {
|
||||
switch (ch) {
|
||||
case 'e': cmd = strdup(optarg);
|
||||
break;
|
||||
@ -487,15 +486,13 @@ int main(int argc, char **argv)
|
||||
argv += optind;
|
||||
|
||||
/* Do we have a command to run? */
|
||||
if (cmd != NULL)
|
||||
{
|
||||
if (cmd != NULL) {
|
||||
if (output != stdout) {
|
||||
fprintf(output, "# Profiling: %s\n", cmd);
|
||||
fflush(output);
|
||||
}
|
||||
child_pid = fork();
|
||||
if (child_pid < 0)
|
||||
{
|
||||
if (child_pid < 0) {
|
||||
perror("fork");
|
||||
exit(1);
|
||||
}
|
||||
@ -511,8 +508,7 @@ int main(int argc, char **argv)
|
||||
fflush(output);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
free(cmd);
|
||||
}
|
||||
}
|
||||
@ -711,8 +707,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Check if child has gone */
|
||||
if (child_pid > 0)
|
||||
{
|
||||
if (child_pid > 0) {
|
||||
int res;
|
||||
if ((res = waitpid(child_pid, &child_stat, WNOHANG)) == -1) {
|
||||
perror("waitpid");
|
||||
|
Loading…
x
Reference in New Issue
Block a user