Verified Commit c0807ec1 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

examples: Fix error processing

parent 5fedbe20
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -102,9 +102,9 @@ main(int argc, char* argv[]) {
    }

    // 2. Register the adhoc storage
    if(ADM_register_adhoc_storage(server, adhoc_name, ADM_ADHOC_STORAGE_GEKKOFS,
                                  adhoc_ctx, adhoc_resources,
                                  &adhoc_storage) != ADM_SUCCESS) {
    if((ret = ADM_register_adhoc_storage(
                server, adhoc_name, ADM_ADHOC_STORAGE_GEKKOFS, adhoc_ctx,
                adhoc_resources, &adhoc_storage)) != ADM_SUCCESS) {
        fprintf(stderr, "ADM_register_adhoc_storage() failed: %s\n",
                ADM_strerror(ret));
        goto cleanup;
@@ -154,8 +154,8 @@ main(int argc, char* argv[]) {

    // All the information required by the ADM_register_job() API is now ready.
    // Let's actually contact the server:
    if(ADM_register_job(server, job_resources, reqs, slurm_job_id, &job) !=
       ADM_SUCCESS) {
    if((ret = ADM_register_job(server, job_resources, reqs, slurm_job_id,
                               &job)) != ADM_SUCCESS) {
        fprintf(stderr, "ADM_register_job() failed: %s\n", ADM_strerror(ret));
        goto cleanup;
    }