Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

string typo in C SDK tutorial sample code

2 replies [Last post]
  • Login or register to post comments
Wed, 01/30/2013 - 11:57
Dronz
Offline
Joined: 09/17/2011
Groups: None

I'm not sure where the best place to report typos is, but this seems like a good place so:

In the couchbase-sdk-c-2.0.pdf tutorial sample code, there's a typo in an error string:

{
lcb_store_cmd_t cmd;
const lcb_store_cmd_t *commands[1];
commands[0] = &cmd;
memset(&cmd, 0, sizeof(cmd));
cmd.v.v0.operation = LCB_SET;
cmd.v.v0.key = "foo";
cmd.v.v0.nkey = 3;
cmd.v.v0.bytes = "bar";
cmd.v.v0.nbytes = 3;
err = lcb_store(instance, NULL, 1, commands);
if (err != LCB_SUCCESS) {
fprintf(stderr, "Failed to get: %s\n", lcb_strerror(NULL, err));
return 1;
}
}

The err code there is for a set operation, so the error string in the fprintf call should say "Failed to set" not "Failed to get".

Top
  • Login or register to post comments
Wed, 01/30/2013 - 14:04
tgrall
Offline
Joined: 09/05/2012
Groups: None

Hello

Thanks for raising this.
I have logged a JIRA here : http://www.couchbase.com/issues/browse/CCBC-173

Regards

__________________

Tug
@tgrall

Top
  • Login or register to post comments
Wed, 01/30/2013 - 15:32
Dronz
Offline
Joined: 09/17/2011
Groups: None

Thanks Tug!

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker