[CCBC-173] Small typo in C tutorial Created: 30/Jan/13 Updated: 06/May/13 Resolved: 06/May/13 |
|
| Status: | Closed |
| Project: | Couchbase C client library libcouchbase |
| Component/s: | library |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | None |
| Security Level: | Public |
| Type: | Bug | Priority: | Minor |
| Reporter: | Tug Grall | Assignee: | Karen Zeller |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
From http://www.couchbase.com/forums/thread/string-typo-c-sdk-tutorial-sample-code
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". |
| Comments |
| Comment by Sergey Avseyev [ 06/May/13 ] |
| https://github.com/couchbase/docs/pull/209 |
| Comment by Karen Zeller [ 06/May/13 ] |
| merged |