[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: sarlacc_schem.c
User: danmc
Date: 06/12/22 09:14:11
Modified: . sarlacc_schem.c
Log:
- add a missing "U" to a number which should be considered as unsigned.
- when looking at the output of fopen() which is a FILE *, see if it is
!= NULL instead of > 0 to avoid pointer/integer comparisons.
Revision Changes Path
1.9 +2 -2 eda/geda/gaf/utils/src/sarlacc_schem.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sarlacc_schem.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/utils/src/sarlacc_schem.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- sarlacc_schem.c 7 Feb 2005 23:57:14 -0000 1.8
+++ sarlacc_schem.c 22 Dec 2006 14:14:11 -0000 1.9
@@ -65,7 +65,7 @@
int retval;
retval = ((base[offset+1] & 255) <<8) | (base[offset] & 255);
if(base[offset+1]&128)
- retval = retval | (65535<<16);
+ retval = retval | (65535U << 16);
return retval;
}
@@ -296,7 +296,7 @@
}
cfp = fopen(full_filename, "r");
- if (cfp > 0) {
+ if (cfp != NULL) {
/* "sarlacc_dim=" set by sarlacc_sym */
while (!feof(cfp)) {
fgets(buff, 128, cfp);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs