[Pkg-privacy-commits] [libotr] 71/225: Updates from code review round 2.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:44:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository libotr.

commit d096d09a81448b291dea2cd501c6643fc5541b02
Author: Rob Smits <rdfsmits at cs.uwaterloo.ca>
Date:   Wed Jun 6 16:10:59 2012 -0400

    Updates from code review round 2.
---
 Protocol-v3.html | 6 +++---
 src/instag.c     | 4 ++--
 src/proto.c      | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Protocol-v3.html b/Protocol-v3.html
index 1c33978..9f29186 100644
--- a/Protocol-v3.html
+++ b/Protocol-v3.html
@@ -620,7 +620,7 @@ client to abort the protocol.  The associated length should be zero and
 the associated value should be empty.  If you receive a TLV of this type,
 you should change the SMP state to SMP_EXPECT1 (see below).</dd>
 <dt>Type 7: SMP Message 1Q</dt>
-<dd>Like a SMP Message 1, but whose value begins with a NULL-terminated
+<dd>Like a SMP Message 1, but whose value begins with a NUL-terminated
 user-specified question.</dd>
 <dt>Type 8: Extra symmetric key</dt>
 <dd>The value begins with a 4-byte indication of what this symmetric key
@@ -816,7 +816,7 @@ to Alice.</dd>
 <dd>Verify Alice's zero-knowledge proofs for g<sub>2a</sub> and
 g<sub>3a</sub>:
 <ol>
-<li>Check that both g<sub>2a</sub> and g<sub>3a</sub> >= 2 and
+<li>Check that both g<sub>2a</sub> and g<sub>3a</sub> are >= 2 and
 <= modulus-2.</li>
 <li>Check that c2 = SHA256(1, g<sub>1</sub><sup>D2</sup> 
 g<sub>2a</sub><sup>c2</sup>).</li>
@@ -1432,7 +1432,7 @@ are any combination of the following boolean flags:</p>
 <dl>
 <dt>ALLOW_V1</dt>
 <dd>Allow version 1 of the OTR protocol to be used (in general this
-document will not address OTR protocol version 1, see previous
+document will not address OTR protocol version 1; see previous
 protocol documents for these details).</dd>
 <dt>ALLOW_V2</dt>
 <dd>Allow version 2 of the OTR protocol to be used.</dd>
diff --git a/src/instag.c b/src/instag.c
index 131d529..18143f5 100644
--- a/src/instag.c
+++ b/src/instag.c
@@ -251,8 +251,8 @@ gcry_error_t otrl_instag_write_FILEp(OtrlUserState us, FILE *instf)
     OtrlInsTag *p;
     /* This line should be ignored when read back in, since there are no
     tabs. */
-    fprintf(instf, "%s\n", "#WARNING! You shouldn't copy this file to another"
-    " computer. It is unnecessary and can cause problems.");
+    fprintf(instf, "# WARNING! You shouldn't copy this file to another"
+    " computer. It is unnecessary and can cause problems.\n");
     for(p=us->instag_root; p; p=p->next) {
 	fprintf(instf, "%s\t%s\t%08x\n", p->accountname, p->protocol,
 		p->instag);
diff --git a/src/proto.c b/src/proto.c
index 232d8c3..aed1b85 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -440,7 +440,7 @@ gcry_error_t otrl_proto_instance(const char *otrmsg,
 	goto invval;
     }
 
-    if (strlen(otrtag) < 21 ) return err;
+    if (strlen(otrtag) < 21 ) goto invval;
 
     /* Decode and extract instance tag */
     bufp = malloc(9);
@@ -450,9 +450,9 @@ gcry_error_t otrl_proto_instance(const char *otrmsg,
     read_int(*instance_to);
     free(bufp_head);
     return gcry_error(GPG_ERR_NO_ERROR);
-    invval:
-	err = gcry_error(GPG_ERR_INV_VALUE);
-	return err;
+invval:
+    err = gcry_error(GPG_ERR_INV_VALUE);
+    return err;
 }
 
 /* Create an OTR Data message.  Pass the plaintext as msg, and an

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libotr.git



More information about the Pkg-privacy-commits mailing list