From 836117095713099f09a4f6cd08658371cdc278b1 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 30 Aug 2011 22:15:46 +0000 Subject: [PATCH] Avoid a warning on some platforms --- src/modems/hayes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modems/hayes.c b/src/modems/hayes.c index aaee630..b14c2ee 100644 --- a/src/modems/hayes.c +++ b/src/modems/hayes.c @@ -895,7 +895,8 @@ static char * _request_attention_message_send(ModemPlugin * modem, pdulen-=2; /* FIXME really issue using two separate commands */ if(ret != NULL) - snprintf(ret, len, "%s%lu\r\n%s", cmd, (pdulen - 1) / 2, pdu); + snprintf(ret, len, "%s%lu\r\n%s", cmd, ((unsigned long)pdulen + - 1) / 2, pdu); free(pdu); return ret; }