Re: various part 2
- From: Ali Akcaagac <ali akcaagac stud fh-wilhelmshaven de>
- To: balsa-list gnome org
- Subject: Re: various part 2
- Date: Wed, 17 Oct 2001 17:21:02 +0200
On 2001.10.17 17:15:41 +0200 Peter Bloomfield wrote:
> > so in my opinion checking for true is enough and then else back with
> > false.
>
> You're right--but you must still protect against dereferencing null
> pointers; you could use
>
> if (node && BALSA_IS_MAILBOX_NODE(node)
> && node->mailbox
> && !strcmp(LIBBALSA_MAILBOX(node->mailbox)->url, data->url)) {
> ...
> return TRUE;
> } else {
> return FALSE;
> }
> }
>
> It would probably be worthwhile to declare
>
> LibBalsaMailbox *mailbox;
>
> and then use
>
> if (node && BALSA_IS_MAILBOX_NODE(node)
> && (mailbox = LIBBALSA_MAILBOX(node->mailbox))
> && !strcmp(mailbox->url, data->url)) {
> ...
> return TRUE;
> } else {
> return FALSE;
> }
> }
aye... thanks for the info.
--
Name....: Ali Akcaagac
Status..: Student Of Computer & Economic Science
E-Mail..: mailto:ali.akcaagac@stud.fh-wilhelmshaven.de
WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]