Patchwork [3,of,3,V2] chg: wrap line at 80 chars

login
register
mail settings
Submitter Jun Wu
Date April 5, 2016, 4:47 p.m.
Message ID <d0f3199d741c6fbd5a1e.1459874876@x1c>
Download mbox | patch
Permalink /patch/14383/
State Superseded
Commit b0cc9652e8dc09ba9b6e99a811ecbfc1380bb272
Delegated to: Yuya Nishihara
Headers show

Comments

Jun Wu - April 5, 2016, 4:47 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1459874582 -3600
#      Tue Apr 05 17:43:02 2016 +0100
# Node ID d0f3199d741c6fbd5a1e023632fc9a70afae4d93
# Parent  94d4bd939733ded7d2c97c4b89b889775e565f11
chg: wrap line at 80 chars

This is a style fix. I was using tabstop=4 for some early patches, although
I realized we use tabstop=8 later but these early style issues remains. Let's
fix them.

Patch

diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c
--- a/contrib/chg/chg.c
+++ b/contrib/chg/chg.c
@@ -72,11 +72,14 @@ 
 		size_t len = strlen(flags[i].name);
 		size_t narg = flags[i].narg;
 		if (memcmp(arg, flags[i].name, len) == 0) {
-			if (arg[len] == '\0') {  /* --flag (value) */
+			if (arg[len] == '\0') {
+				/* --flag (value) */
 				return narg + 1;
-			} else if (arg[len] == '=' && narg > 0) {  /* --flag=value */
+			} else if (arg[len] == '=' && narg > 0) {
+				/* --flag=value */
 				return 1;
-			} else if (flags[i].name[1] != '-') {  /* short flag */
+			} else if (flags[i].name[1] != '-') {
+				/* short flag */
 				return 1;
 			}
 		}
@@ -163,7 +166,8 @@ 
 static void lockcmdserver(struct cmdserveropts *opts)
 {
 	if (opts->lockfd == -1) {
-		opts->lockfd = open(opts->lockfile, O_RDWR | O_CREAT | O_NOFOLLOW, 0600);
+		opts->lockfd = open(opts->lockfile,
+				    O_RDWR | O_CREAT | O_NOFOLLOW, 0600);
 		if (opts->lockfd == -1)
 			abortmsgerrno("cannot create lock file %s",
 				      opts->lockfile);