[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Using smsd to send multiline sms
From: |
Jan Derfinak |
Subject: |
Re: [PATCH] Using smsd to send multiline sms |
Date: |
Fri, 18 Jul 2008 16:42:12 +0200 (CEST) |
On Fri, 18 Jul 2008, Pawel Kot wrote:
> IMHO memsets are not needed.
> I'd also use construction (it's not needed if fgets() in case of
> failure sets NULL as the string -- I cannot see this guaranteed in the
> manpage):
> if (!fgets(...)) {
> sms.something[0] = '\0';
> }
> slen = ....
Are you sure that fgets changes address of destination string to NULL?
It returns NULL, but do not change destination string.
The idea of my construction is that memset initialize memory of the string
with 0.
This also represent empty string in terms of definition of string in C
language.
Consecutive call of fgets can:
a) Do nothing with string.
b) Place some data to string.
In both cases the string will be null terminated.
jan
--
- Re: [PATCH] Using smsd to send multiline sms, (continued)
- Re: [PATCH] Using smsd to send multiline sms, Joan, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Pawel Kot, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Joan, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Jan Derfinak, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Jan Derfinak, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Joan, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Jan Derfinak, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Pawel Kot, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Jan Derfinak, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Pawel Kot, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms,
Jan Derfinak <=
- Re: [PATCH] Using smsd to send multiline sms, Pawel Kot, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Jan Derfinak, 2008/07/18
- Re: [PATCH] Using smsd to send multiline sms, Pawel Kot, 2008/07/20