make lint happy(ier)

This commit is contained in:
dcp1990 2005-06-18 21:47:16 +00:00
parent 7a7994b41a
commit dd107285cf
4 changed files with 12 additions and 7 deletions

View file

@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $Amigan: phoned/phoned/db.c,v 1.1 2005/06/18 20:23:45 dcp1990 Exp $ */ /* $Amigan: phoned/phoned/db.c,v 1.2 2005/06/18 21:47:16 dcp1990 Exp $ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <pthread.h> #include <pthread.h>
@ -57,7 +57,7 @@ short db_check_for_table(tablename, dbh) /* needs to be locked before use!!!!!!!
} }
while((rc = sqlite3_step(cst)) == SQLITE_ROW) { while((rc = sqlite3_step(cst)) == SQLITE_ROW) {
result = sqlite3_column_text(cst, 0); result = sqlite3_column_text(cst, 0);
if(strcmp(result, tablename) == 0) { if(strcmp((const char *)result, tablename) == 0) {
sqlite3_finalize(cst); sqlite3_finalize(cst);
return 1; return 1;
} }

View file

@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $Amigan: phoned/phoned/filters.c,v 1.10 2005/06/16 21:05:00 dcp1990 Exp $ */ /* $Amigan: phoned/phoned/filters.c,v 1.11 2005/06/18 21:47:16 dcp1990 Exp $ */
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@ -46,9 +46,13 @@ void free_cond_elms(cond)
if(cond->namerx.prex != NULL) free(cond->namerx.prex); if(cond->namerx.prex != NULL) free(cond->namerx.prex);
if(cond->numbrx.prex != NULL) free(cond->numbrx.prex); if(cond->numbrx.prex != NULL) free(cond->numbrx.prex);
} }
#ifdef lint
void free_condition(cond_t* h, short traverse)
#else
void free_condition(h, traverse) void free_condition(h, traverse)
cond_t* h; cond_t* h;
short traverse; short traverse;
#endif
{ {
cond_t *ls, *c, *tp; cond_t *ls, *c, *tp;
tp = h; tp = h;

View file

@ -187,7 +187,7 @@ void *modem_io(k)
/* struct timeval tv; /* struct timeval tv;
short dotm = 0; */ short dotm = 0; */
char cbuf[2]; char cbuf[2];
k = 0; if(k == 0) ;
*cbuf = '\0'; cbuf[1] = '\0'; *cbuf = '\0'; cbuf[1] = '\0';
pthread_mutex_lock(&modemmx); pthread_mutex_lock(&modemmx);
pthread_mutex_lock(&miomx); pthread_mutex_lock(&miomx);
@ -227,6 +227,7 @@ void *modem_io(k)
} }
} }
} }
/* NOTREACHED */
pthread_mutex_unlock(&miomx); pthread_mutex_unlock(&miomx);
pthread_mutex_unlock(&modemmx); pthread_mutex_unlock(&modemmx);
pthread_exit(NULL); pthread_exit(NULL);

View file

@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $Amigan: phoned/phoned/notify.c,v 1.3 2005/06/12 22:25:55 dcp1990 Exp $ */ /* $Amigan: phoned/phoned/notify.c,v 1.4 2005/06/18 21:47:16 dcp1990 Exp $ */
#include <fcntl.h> #include <fcntl.h>
#include <ctype.h> #include <ctype.h>
#include <unistd.h> #include <unistd.h>
@ -87,7 +87,7 @@ int cid_notify(cid_t* c)
char* msg; char* msg;
int s; int s;
struct sockaddr_in sin; struct sockaddr_in sin;
int on = 0x1; char on = 0x1;
addrsll_t *cur; addrsll_t *cur;
len = strlen(c->number) + strlen(c->name) + 8 + 5 + 4; len = strlen(c->number) + strlen(c->name) + 8 + 5 + 4;
msg = malloc(len * sizeof(char)); msg = malloc(len * sizeof(char));
@ -97,7 +97,7 @@ int cid_notify(cid_t* c)
bzero(&sin, sizeof(sin)); bzero(&sin, sizeof(sin));
sin.sin_family = AF_INET; sin.sin_family = AF_INET;
sin.sin_port = htons(3890); sin.sin_port = htons(3890);
if(setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char*)&on, sizeof(on)) < 0) { if(setsockopt(s, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on)) < 0) {
lprintf(error, "setsockopt: %s\n", strerror(errno)); lprintf(error, "setsockopt: %s\n", strerror(errno));
return -1; return -1;
} }