public inbox for hail-devel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: Re: [Patch 1/1] CLD: Introduce the "New CLD" API
Date: Sat, 13 Feb 2010 19:52:18 -0500	[thread overview]
Message-ID: <4B774942.9040308@garzik.org> (raw)
In-Reply-To: <20100207121550.7ee94ff6@redhat.com>

On 02/07/2010 02:15 PM, Pete Zaitcev wrote:
> +	case CREQ_MKDIR:
> +		rc = 0;
> +		fhp = ncld_open(nsp, creq.path,
> +				COM_DIRECTORY | COM_CREATE | COM_EXCL,&error,
> +				0, NULL, NULL);
> +		if (fhp)
> +			ncld_close(fhp);
> +		else
> +			rc = error;
> +		break;
> +
[...]
> -	}
> -	if (tcode != TC_OK) {
> -		fprintf(stderr, "thread startup failed\n");
> +	nsp = ncld_sess_open(dr->host, dr->port,&error, sess_event, NULL,
> +			     "cldcli", "cldcli");
> +	if (!nsp) {
> +		if (error<  1000) {
> +			fprintf(stderr, TAG ": cannot open CLD session: %s\n",
> +				strerror(error));
> +		} else {
> +			fprintf(stderr, TAG ": cannot open CLD session: %d\n",
> +				error);
> +		}
>   		return 1;
>   	}


A point of style:  the 'p' suffix is discouraged.  It is too much like 
the much-maligned Hungarian notation, which is odious in part because it 
duplicates information found in the type definition.  In this case, 'p' 
duplicates the indication that it is a pointer.

The return value from ncld_sess_open() should be named 'ns' or 'sess' or 
similar.  The return value from ncld_open() should be named 'fh' or similar.

	Jeff



  parent reply	other threads:[~2010-02-14  0:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-07 19:15 [Patch 1/1] CLD: Introduce the "New CLD" API Pete Zaitcev
2010-02-07 22:26 ` Jeff Garzik
2010-02-08 12:32 ` Jeff Garzik
2010-02-09  0:30   ` Pete Zaitcev
2010-02-09  6:25     ` Jeff Garzik
2010-02-09  1:46   ` Pete Zaitcev
2010-02-09  2:06     ` Jeff Garzik
2010-02-09  2:17       ` Pete Zaitcev
2010-02-09  4:55         ` Jeff Garzik
2010-02-09  5:35           ` Pete Zaitcev
2010-02-09  6:03             ` Jeff Garzik
2010-02-14  0:52 ` Jeff Garzik [this message]
2010-02-18  0:05   ` Pete Zaitcev
2010-02-18  1:18     ` Jeff Garzik
2010-02-19  1:35       ` Pete Zaitcev
2010-02-19  2:41         ` Jeff Garzik
2010-02-19 22:23           ` Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B774942.9040308@garzik.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    --cc=zaitcev@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox