Procházet zdrojové kódy

Format files according to clang-format

Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
Stephan Lachnit před 3 roky
rodič
revize
6c60565f33
2 změnil soubory, kde provedl 8 přidání a 12 odebrání
  1. 6 7
      common/common-governors.c
  2. 2 5
      daemon/gamemoded.c

+ 6 - 7
common/common-governors.c

@@ -122,12 +122,9 @@ const char *get_gov_state(void)
 		long length = ftell(f);
 		fseek(f, 0, SEEK_SET);
 
-		if (length == -1)
-		{
+		if (length == -1) {
 			LOG_ERROR("Failed to seek file %s\n", gov);
-		}
-		else
-		{
+		} else {
 			char contents[length];
 
 			if (fread(contents, 1, (size_t)length, f) > 0) {
@@ -135,8 +132,10 @@ const char *get_gov_state(void)
 				strtok(contents, "\n");
 				if (strlen(governor) > 0 && strncmp(governor, contents, 64) != 0) {
 					/* Don't handle the mixed case, this shouldn't ever happen
-					* But it is a clear sign we shouldn't carry on */
-					LOG_ERROR("Governors malformed: got \"%s\", expected \"%s\"", contents, governor);
+					 * But it is a clear sign we shouldn't carry on */
+					LOG_ERROR("Governors malformed: got \"%s\", expected \"%s\"",
+					          contents,
+					          governor);
 					fclose(f);
 					return "malformed";
 				}

+ 2 - 5
daemon/gamemoded.c

@@ -133,12 +133,9 @@ static void daemonize(const char *name)
 	int devnull_r = open("/dev/null", O_RDONLY);
 	int devnull_w = open("/dev/null", O_WRONLY);
 
-	if (devnull_r == -1 || devnull_w == -1)
-	{
+	if (devnull_r == -1 || devnull_w == -1) {
 		LOG_ERROR("Failed to redirect standard input and output to /dev/null\n");
-	}
-	else
-	{
+	} else {
 		dup2(devnull_r, STDIN_FILENO);
 		dup2(devnull_w, STDOUT_FILENO);
 		dup2(devnull_w, STDERR_FILENO);