From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Meyering Date: Fri, 26 Jun 2009 09:39:01 +0200 Subject: [Cluster-devel] [PATCH dlm] fix compile failures Message-ID: <87prcr8mwa.fsf@meyering.net> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit dlm.git (master) did not build: dlmtest2.c: In function ?main?: dlmtest2.c:1418: warning: the address of ?cmd? will always evaluate as ?true? dlmtest2.c:1420: error: label ?out? used but not defined With these changes, it does: >From cdda56dcbb999b3ffd6dd080fa97f8dd8eefcc14 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 26 Jun 2009 09:34:49 +0200 Subject: [PATCH dlm] fix compile failures * dlm/tests/usertest/dlmtest2.c: (main): Restore accidentally removed label. It's still used. (main): Test "opt_cmd", rather than the always-true array, "cmd". --- dlm/tests/usertest/dlmtest2.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlm/tests/usertest/dlmtest2.c b/dlm/tests/usertest/dlmtest2.c index 6160d4a..9d3afd9 100644 --- a/dlm/tests/usertest/dlmtest2.c +++ b/dlm/tests/usertest/dlmtest2.c @@ -120,7 +120,7 @@ static void unlockf(int i); static int rand_int(int a, int b) { - return a + (int) (((float)(b - a + 1)) * random() / (RAND_MAX+1.0)); + return a + (int) (((float)(b - a + 1)) * random() / (RAND_MAX+1.0)); } static const char *status_str(int status) @@ -1415,7 +1415,7 @@ int main(int argc, char *argv[]) client_add(libdlm_fd, &maxi); - if (cmd) { + if (opt_cmd) { process_command(&quit); goto out; } @@ -1450,6 +1450,7 @@ int main(int argc, char *argv[]) break; } + out: if (openclose_ls) { printf("dlm_close_lockspace\n"); @@ -1466,4 +1467,3 @@ int main(int argc, char *argv[]) return 0; } - -- 1.6.3.3.420.gd4b46