summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-15/+40
| | | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in cb_instance_free(), cb_instance_hosturl_set(), and cb_instance_starttls_set(), cb_instance_bindmech_set(), and cb_instance_config_get().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-3/+8
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in acl_access_allowed_main().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-3/+9
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in __acllist_add_aci() and acllist_aciscan_update_scan().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-2/+14
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in acllas__client_match_URL() and acllas__user_has_role().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-2/+7
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in aclg_get_usersGroup().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-5/+20
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in acl_access_allowed() and acl__TestRights().
* Bug 610281 - fix coverity Defect Type: Control flow issues - last repl init ↵Rich Megginson2010-08-181-1/+1
| | | | | | | | | | | | | | | | | status https://bugzilla.redhat.com/show_bug.cgi?id=610281 Resolves: bug 610281 Bug Description: fix coverity Defect Type: Control flow issues - last repl init status Reviewed by: one-line rule Branch: master Fix Description: agmt_set_last_init_status() is never called in order to set the status to "Replica acquired successfully". Adding that string to the message breaks tests that expect init success to report 0 Total update succeeded Platforms tested: RHEL5 x86_64, Fedora 14 x86_64 Flag Day: no Doc impact: no
* Bug 610281 - fix coverity Defect Type: Control flow issues - ↵Rich Megginson2010-08-161-6/+5
| | | | | | | | | | | | | | | | daemon.c:write_function() https://bugzilla.redhat.com/show_bug.cgi?id=610281 Resolves: bug 610281 Bug Description: fix coverity Defect Type: Control flow issues - daemon.c:write_function() Reviewed by: nhosoi (Thanks!) Branch: master Fix Description: sentbytes < count is ok in the non error case - it just means we need to send some more data. Move the checking to the error case so we can print the number of bytes sent and expected. Platforms tested: RHEL5 x86_64, Fedora 14 x86_64 Flag Day: no Doc impact: no
* Bug 623118 - Simplepaged results going in infinite loopNoriko Hosoi2010-08-111-0/+4
| | | | | | | | | | | if a sub suffix exists in the domain https://bugzilla.redhat.com/show_bug.cgi?id=623118 Description: When paging is done on a backend, and if there are more sub backends to be searched and paged, simple paged code is supposed to set the next backend to connection->c_current_be. The setting was missing.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-1/+1
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "new_row" assignment on line 87 can be removed because it is not needed.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-1/+1
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: Pointer "slapdFrontendConfig" returned by "init_config" is never used (line 244).
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-2/+0
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: Calling slapi_sdn_get_dn and assigning the return value to base is not needed.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-4/+3
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "p" assignments on line 260, 264, and 268 can be removed because they are not needed.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-5/+0
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: Pointer "log_dir" returned by "dblayer_get_home_dir" is never used (line 1492). Removing the unnecessary else clause.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-3/+2
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "cn" assignment on line 221 can be removed because it is not needed.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-2/+1
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: Pointer "replica" returned by "object_get_data(prp->replica_object)" (line 502) is never used. In "case STATE_READY_TO_ACQUIRE", Replica object "replica" is not needed.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-3/+1
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The return value from object_get_data is assigend to ruv just to check if repl_ruv object exists or not with PR_ASSERT in the DEBUG mode (line 218). Passing the object_get_data call to PR_ASSERT directly.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-3/+2
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: Pointer "replica" returned by "object_get_data(prp->replica_object)" (line 826) is never used. In "case STATE_READY_TO_ACQUIRE", Replica object "replica" is not needed.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-1/+1
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "bval" assignment on line 636 can be removed because any value is accepted. Note: This is to set debug mode "cb_set_debug(1)" which is enabled by having nsDebug in the chaining config entry.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "ptr" assignment on line 2622 is unnecessary because the value is never used. The "word" assignment on line 2630 can be removed because the first token is ignored. Alternatively the value should be validated. The "ptr" assignment on line 1456 is unnecessary because the value is not used. The "word" assignment on line 1463 can be removed because the first token is ignored. Alternatively the value should be validated. The "ptr" assignment on line 1210 is unnecessary because the value is never used. The "word" assignment on line 1217 can be removed because the first token is ignored. Alternatively the value should be validated.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-9/+23
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The result of PR_HashTableAdd() should be checked for NULL value. Applied the change to all the PR_HashTableAdd calls in this file lib/libaccess/register.cpp.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-6/+6
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "word" assignment on line 961 and 963 is unnecessary because the value will be overwritten. Comment: The "s" assignments on line 271, 280, and 281 are unnecessary because the value is never used.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-2/+0
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The call to strchr() is unnecessary because strcpy() will ensure that string p is NULL-terminated.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-1/+1
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The str assignment on line 1240 can be removed because the value is not needed or will be overwritten.
* Bug 622628 - fix coverity Defect Type: Integer handling issuesNoriko Hosoi2010-08-111-3/+4
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622628 Comment: There is a suspicious implicit sign extension. Instead of direct bit shifting, use ntohl to decode buffer length.
* Bug 622628 - fix coverity Defect Type: Integer handling issuesNoriko Hosoi2010-08-101-1/+1
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622628 Comment: slapd_system_strerror does not cover the return codes from the libdb functions. Instead, use dblayer_strerror for describing error number.
* Bug 622628 - fix coverity Defect Type: Integer handling issuesNoriko Hosoi2010-08-101-1/+3
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622628 Comment: This is a typo where a bitwise AND was used instead of a logical AND on line 2185. The issue is not serious, as it only affect the "number of operations" counter for ldclt. The second half of the condition is not even needed in fact, since we are guaranteed that "(ret == LDAP_ALREADY_EXISTS)" is true at line 2185. Fix Description: Based upon the comment, removing the unnecessary second half of the condition.
* Bug 194531 - db2bak is too noisyNoriko Hosoi2010-08-107-34/+85
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=194531 Description: Introduced "-q" option to suppress the backing up/ restoring message for each db file. Usage: db2bak [archivedir] [-q] [-h] Usage: bak2db archivedir [-n backendname] [-q] | [-h] If "-q" is specified, the verbose messages are not prited to the standard error, but just to the errors log. In addition, new log level SLAPI_LOG_BACKLDBM/LDAP_DEBUG_BACKLDBM has been introduced.
* 621928 - Unable to enable replica (rdn problem?) on 1.2.6 rc6Noriko Hosoi2010-08-092-13/+271
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=621928 Description: RUV (nsuniqueid=ffffffff-ffffffff-ffffffff-ffffffff,<suffix>) needs to be allowed to add to the DB before <suffix> is added. To allow it, entryrdn prepares the rdn exception list (rdn_exceptions). If the to-be-added entry (in this case RUV; and currently only RUV is in the list) is in the list, <suffix> is added to the entryrdn index with the temporary entry ID 0 (note: not to the primary db file id2entry.db#). When the suffix is indeed added to the DB, the temporary ID 0 is replaced with the given real ID.
* bump version to 1.2.7.a1Rich Megginson2010-08-051-2/+2
|
* 513166 - Simple Paged result doesn't provide the server's estimateNoriko Hosoi2010-08-048-6/+81
| | | | | | | | | | | | | | | | | of the total number of entries https://bugzilla.redhat.com/show_bug.cgi?id=513166 Description: By definition, the first integer of the response control is for the estimated search result set size. This fix sets the estimated result set size. * controlType = LDAP_CONTROL_PAGEDRESULTS; * criticality = n/a; * controlValue: * realSearchControlValue ::= SEQUENCE { * size INTEGER (0..maxInt), * -- result set size estimate from server * cookie OCTET STRING
* Bug 617862 - Replication: Unable to delete tombstone errorsRich Megginson2010-08-031-1/+1
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=617862 Resolves: bug 617862 Bug Description: Replication: Unable to delete tombstone errors Reviewed by: nhosoi (Thanks!) Branch: master Fix Description: In the case of deletion of a tombstone entry, the target entry 'e' is the tombstone entry. 'tombstone' is not used for this purpose. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no (cherry picked from commit 84e6cc2ffd7a3aa684959d22e6fc2ab3a15791de)
* Bug 594745 - Get rid of dirsrv_lib_t labelNathan Kinder2010-08-033-33/+0
| | | | | | | The dirsrv_lib_t label used to label the dirsrv libraries is causing AVCs to occur from prelink. It turns out that the dirsrv_lib_t label is not really necessary. We can just allow our libraries to use the default label of lib_t.
* Bug 617629 - Missing aliases in new schema filesRich Megginson2010-08-023-38/+57
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=617629 Resolves: bug 617629 Bug Description: Missing aliases in new schema files Reviewed by: nkinder (Thanks!) Branch: master Fix Description: add back the aliases we removed - added a new schema flag X-DEPRECATED - this is a quoted string containing a space separated list of the deprecated aliases for this attribute Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no (cherry picked from commit 34c4ab700d99e455ba3523e7d7a02e4eae401d3d)
* 619595 - Upgrading sub suffix under non-normalized suffix disappearsNoriko Hosoi2010-07-292-42/+29
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=619595 Fix Description: The cause of this problem is the config attribute nsslapd-parent-suffix was not defined as an attribute of DN syntax. Because of the missing definition, the value is not the target of the DN normalization and the match fails after upgraded. Adding the attribute to the schema solves this problem. Plus upgradedb does backup the DB before upgrade, and if it fails it restores from the backed up DB. Use dblayer_restore instead of copying DB files one by one.
* 616608 - SIGBUS in RDN index reads on platforms with strict alignmentsNoriko Hosoi2010-07-274-91/+126
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=616608 Fix description: Use the marshall/unmarshall technique for the entryrdn index data. Introduced sizeushort_internal_to_stored/sizeushort_stored_to_internal for the size data to store in 2 bytes. Entryrdn related functions in the dbscan utility are also modified to support marshalled data. Reviewed by ulf.weltman@hp.com and fixed bugs found by him.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-65/+61
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11958 NO_EFFECT Triaged Unassigned Bug Moderate Fix Required do_bind() ds/ldap/servers/slapd/bind.c Comment: slapi_dn_normalize_ext() may return a negative value but rc is of type ber_tag_t which is an unsigned int. Introducing "ber_tag_t ber_rc" just for ber functions and "int rc" for the rest.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-2/+0
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11843 DEADCODE Triaged Unassigned Bug Minor Fix Required mm_init() ds/ldap/servers/slapd/tools/mmldif.c Comment: A variable tailorfile is not used. Remove it.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11841 DEADCODE Triaged Unassigned Bug Minor Fix Required sasl_map_new_private() ds/ldap/servers/slapd/sasl_map.c Comment: This new_lock NULL checking is not needed. On this path, the condition "NULL == new_lock" cannot be true. 97 if (NULL == new_lock) { Execution cannot reach this statement "slapi_ch_free((void**)new_p...". 98 slapi_ch_free((void**)new_priv); 99 return NULL; 100 } 11842 DEADCODE Triaged Unassigned Bug Minor Fix Required sasl_map_insert_list_entry() ds/ldap/servers/slapd/sasl_map.c Comment: In sasl_map_insert_list_entry, /* Check to see if it's here already */ was not implemented. The variable ishere pointed by coverity should have been prepared for the purpose. Implementing a helper function sasl_map_cmp_data.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-8/+9
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11834 DEADCODE Triaged Unassigned Bug Minor Fix Required write_function() ds/ldap/servers/slapd/daemon.c Comment: The location of checking for sentbytes is not correct. Execution cannot reach this statement "if (sentbytes < count){ {...". 1724 } else if (sentbytes < count) { 1725 LDAPDebug(LDAP_DEBUG_CONNS, It should not be "else" of checking for "bytes". Moving the check after "else if (sentbytes > count)".
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-4/+2
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11832 DEADCODE Triaged Unassigned Bug Minor Fix Required do_modrdn() ds/ldap/servers/slapd/modrdn.c Comment: At the line 201 and 212, the condition "rawnewsuperior" cannot be false. 201 rawnewsuperior?rawnewsuperior:"", 212 rawnewsuperior?rawnewsuperior:"", This patch is removing the checks.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-12/+9
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11831 DEADCODE Triaged Unassigned Bug Minor Fix Required config_set_value() ds/ldap/servers/slapd/libglobs.c Comment: The config_set_value meant to set various values (e.g. "off" and "unknown") depending upon the config_var_type, but this code overrides the spec and set the empty string to all cases. - /* for null values, just set the attr value to the empty - string */ - if (!value) { - slapi_entry_attr_set_charptr(e, cgas->attr_name, ""); - return; - } This patch removes the above blind empty string setting and relies on the values in each config_var_type case. Plus, adding the NULL value check to CONFIG_CHARRAY.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-9/+9
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11829 DEADCODE Triaged Unassigned Bug Minor Fix Required ldbm_back_start() ds/ldap/servers/slapd/back-ldbm/start.c Comment: The code meant the autosized cache should be reduced 25% if the calculated size was less than 500MB for the overhead of libdb. If larger than 500MB, the overhead is relatively small and can be ignored. The code should have calculated the size before comparing it to 500MB.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-1/+1
| | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11826 DEADCODE Triaged Unassigned Bug Minor Fix Required ldbm_back_search() ds/ldap/servers/slapd/back-ldbm/ldbm_search.c Comment: On this path, the condition "abandoned" cannot be true. 504 return ldbm_back_search_cleanup(pb, li, sort_control, 505 (abandoned?-1:LDAP_PROTOCOL_ERROR), 506 "Sort Response Control", -1, 507 &basesdn, &vlv_request_control); Line 505 should be 505 LDAP_PROTOCOL_ERROR,
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-8/+1
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11825 DEADCODE Triaged Unassigned Bug Minor Fix Required ldbm_back_modrdn() ds/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c Comment: It was checking if (parententry && parententry->ep_entry) in the if ( parententry == NULL ) clause. Removed the unnecessary code.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-4/+0
| | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11821 DEADCODE Triaged Unassigned Bug Minor Fix Required allinstance_set_busy() ds/ldap/servers/slapd/back-ldbm/misc.c 11822 DEADCODE Triaged Unassigned Bug Minor Fix Required allinstance_set_not_busy() ds/ldap/servers/slapd/back-ldbm/misc.c Comment: objset_next_obj releases the previous object internally. Thus, there is no leak. Just remove the 2 lines: if (inst_obj) object_release(inst_obj);
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-2/+1
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11820 DEADCODE Triaged Unassigned Bug Minor Fix Required idl_new_delete_key() ds/ldap/servers/slapd/back-ldbm/idl_new.c Comment: tmpid is no longer used. Since we don't define DB_ALLIDS_ON_WRITE, ALLID has no chance to be stored in the db. But the code should be fixed as follows: Remove: 480 ID tmpid = 0; The 496 must be 496 if (id == ALLID) {
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-3/+1
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11818 DEADCODE Triaged Unassigned Bug Minor Fix Required agt_mopen_stats() ds/ldap/servers/slapd/agtmmap.c Comment: Removing the unreachable statement: Execution cannot reach this statement "return 0;". 313 return 0;
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-1/+0
| | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11817 DEADCODE Triaged Unassigned Bug Moderate Fix Required NSUniqueAttr_Init() ds/ldap/servers/plugins/uiduniq/uid.c Comment: NSUniqueAttr_Init declared err twice. One at the top and another in BEGIN - END (do - while loop). The second err in the do - while loop is trashed when it gets out of the loop. Regardless of the result in the do - while loop, err = 0 (success) was returned to the caller. We are removing the second err in the BEGIN (== do - while) scope. 945 int err;
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-1/+0
| | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11816 DEADCODE Triaged Unassigned Bug Moderate Fix Required NS7bitAttr_Init() ds/ldap/servers/plugins/uiduniq/7bit.c Comment: NS7bitAttr_Init declared err twice. One at the top and another in BEGIN - END (do - while loop). The second err in the do - while loop is trashed when it gets out of the loop. Regardless of the result in the do - while loop, err = 0 (success) was returned to the caller. We are removing the second err in the BEGIN (== do - while) scope. 692 int err;