cvsuser 01/10/11 11:28:44
Modified: . strnative.c
Log:
Assignment, not comparison. (Plus formatted for coding standards)
Courtesy of Bryan C. Warnock
Revision Changes Path
1.17 +7 -3 parrot/strnative.c
Index: strnative.c
===================================================================
RCS file: /home/perlcvs/parrot/strnative.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -w -r1.16 -r1.17
--- strnative.c 2001/10/10 18:21:04 1.16
+++ strnative.c 2001/10/11 18:28:44 1.17
@@ -1,7 +1,7 @@
/* strnative.c
* Copyright: (When this is determined...it will go here)
* CVS Info
- * $Id: strnative.c,v 1.16 2001/10/10 18:21:04 tom Exp $
+ * $Id: strnative.c,v 1.17 2001/10/11 18:28:44 tom Exp $
* Overview:
* This defines the native string routines.
* Data Structure and Algorithms:
@@ -91,11 +91,15 @@
if (s1->bufused < s2->bufused) {
cmp = memcmp(s1->bufstart, s2->bufstart, s1->bufused);
- if (cmp == 0) cmp == -1;
+ if (cmp == 0) {
+ cmp = -1;
}
+ }
else {
cmp = memcmp(s1->bufstart, s2->bufstart, s2->bufused);
- if (cmp ==0 && s1->bufused > s2->bufused) cmp = 1;
+ if (cmp == 0 && s1->bufused > s2->bufused) {
+ cmp = 1;
+ }
}
return cmp;