fix a few more warnings
This commit is contained in:
@@ -645,7 +645,7 @@ bayrad_hbar(Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
MODULE_EXPORT int
|
||||
bayrad_icon(Driver * drvthis, int x, int y, int icon)
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
/*PrivateData *p = drvthis->private_data;
|
||||
static char icons[3][5*8] = {
|
||||
{
|
||||
1,1,1,1,1, // Empty Heart
|
||||
@@ -675,7 +675,7 @@ bayrad_icon(Driver * drvthis, int x, int y, int icon)
|
||||
0,0,0,0,0,
|
||||
1,0,1,0,1,
|
||||
}
|
||||
};
|
||||
};*/
|
||||
|
||||
switch (icon) {
|
||||
case ICON_BLOCK_FILLED:
|
||||
|
||||
@@ -136,7 +136,7 @@ read_tele(PrivateData *p, char *buffer)
|
||||
&& (zeichen==cc))
|
||||
{
|
||||
buffer[len]=0x00;
|
||||
debug(RPT_DEBUG, "%s: read %s", __FUNCTION__, buffer);
|
||||
/*debug(RPT_DEBUG, "%s: read %s", __FUNCTION__, buffer)*/;
|
||||
return True;
|
||||
}
|
||||
else
|
||||
@@ -204,7 +204,7 @@ real_send_tele(PrivateData *p, char *buffer, int len)
|
||||
/* Take a little nap. This works as a pacemaker */
|
||||
usleep(50);
|
||||
|
||||
debug(RPT_DEBUG, "%s: sent %s", __FUNCTION__, buffer);
|
||||
/*debug(RPT_DEBUG, "%s: sent %s", __FUNCTION__, buffer);*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+9
-4
@@ -128,14 +128,19 @@ handle_input ()
|
||||
void input_send_to_client (Client * c, const char * key)
|
||||
{
|
||||
char * s;
|
||||
size_t size = strlen(key) + sizeof("key %s\n"); // this is large enough
|
||||
|
||||
debug (RPT_DEBUG, "%s( client=[%d], key=\"%.40s\" )", __FUNCTION__, c->sock, key);
|
||||
|
||||
/* Allocate just as much as we need */
|
||||
s = malloc (strlen(key) + strlen("key \n") + 1);
|
||||
sprintf(s, "key %s\n", key);
|
||||
sock_send_string(c->sock, s);
|
||||
free (s);
|
||||
s = calloc (1, size);
|
||||
if (s != NULL) {
|
||||
snprintf(s, size, "key %s\n", key);
|
||||
sock_send_string(c->sock, s);
|
||||
free (s);
|
||||
}
|
||||
else
|
||||
report(RPT_ERR, "%s: malloc failure", __FUNCTION__);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user