Fix warnings about unsigned/signed and pointer comparisons.
This commit is contained in:
parent
f46e66165e
commit
8caa9a68bc
2 changed files with 5 additions and 5 deletions
2
secipd.c
2
secipd.c
|
@ -495,7 +495,7 @@ int main (int argc, char **argv) {
|
||||||
if ((pid = fork())) {
|
if ((pid = fork())) {
|
||||||
/* Write PID file */
|
/* Write PID file */
|
||||||
pidfile = fopen(conf->pid_file, "w");
|
pidfile = fopen(conf->pid_file, "w");
|
||||||
if (pidfile < 0)
|
if (pidfile == NULL)
|
||||||
return ST_LOG_ERR;
|
return ST_LOG_ERR;
|
||||||
|
|
||||||
fprintf(pidfile, "%d\n", pid);
|
fprintf(pidfile, "%d\n", pid);
|
||||||
|
|
8
siahsd.c
8
siahsd.c
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
static STATUS send_reply(TALLOC_CTX *mem_ctx, int sock, struct sockaddr_in from, struct siahs_packet *pkt, const char *string) {
|
static STATUS send_reply(TALLOC_CTX *mem_ctx, int sock, struct sockaddr_in from, struct siahs_packet *pkt, const char *string) {
|
||||||
uint8_t *reply;
|
uint8_t *reply;
|
||||||
int i;
|
uint32_t i;
|
||||||
uint16_t sum = 0;
|
uint16_t sum = 0;
|
||||||
uint32_t reply_len;
|
uint32_t reply_len;
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ static STATUS send_reply(TALLOC_CTX *mem_ctx, int sock, struct sockaddr_in from,
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
int sock, n, i;
|
int sock, n;
|
||||||
socklen_t fromlen;
|
socklen_t fromlen;
|
||||||
struct sockaddr_in server;
|
struct sockaddr_in server;
|
||||||
struct sockaddr_in from;
|
struct sockaddr_in from;
|
||||||
|
@ -192,7 +192,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
pkt->len = ntohl(*(uint32_t *)&buf[0]);
|
pkt->len = ntohl(*(uint32_t *)&buf[0]);
|
||||||
|
|
||||||
if (pkt->len > n-4) {
|
if (pkt->len > (uint32_t) (n - 4)) {
|
||||||
DEBUG(0, "Message length is longer than the packet (malformed packet!)");
|
DEBUG(0, "Message length is longer than the packet (malformed packet!)");
|
||||||
talloc_free(pkt);
|
talloc_free(pkt);
|
||||||
continue;
|
continue;
|
||||||
|
@ -207,7 +207,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
|
|
||||||
/* Decode with XOR 0xB6 */
|
/* Decode with XOR 0xB6 */
|
||||||
for (i = 0;i < pkt->len - 6; i++) {
|
for (uint32_t i = 0; i < pkt->len - 6; i++) {
|
||||||
decoded[i] ^= 0xB6;
|
decoded[i] ^= 0xB6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue