X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Frx%2Fsimple.example%2Fsample_server.c;h=6aa8cc6cd6a9387e1ace712fd63bb43049abb31a;hp=dbc7c784659d760ee7425b8d0d22d1a63047c76f;hb=71171262602d7f261adbffd5047266e94c4a6f92;hpb=6380213d296c138349c77fa4a51655fac23cfeea diff --git a/src/rx/simple.example/sample_server.c b/src/rx/simple.example/sample_server.c index dbc7c78..6aa8cc6 100644 --- a/src/rx/simple.example/sample_server.c +++ b/src/rx/simple.example/sample_server.c @@ -18,7 +18,10 @@ #define N_SECURITY_OBJECTS 1 -main() +static void Quit(char *); + +int +main(int argc, char **argv) { struct rx_securityClass *(securityObjects[N_SECURITY_OBJECTS]); struct rx_service *service; @@ -41,13 +44,12 @@ main() rx_StartServer(1); /* Donate this process to the server process pool */ Quit("StartServer returned?"); + + return 0; } int -TEST_Add(call, a, b, result) - struct rx_call *call; - int a, b; - int *result; +STEST_Add(struct rx_call *call, int a, int b, int *result) { printf("TEST_Add(%d,%d)\n", a, b); *result = a + b; @@ -55,19 +57,16 @@ TEST_Add(call, a, b, result) } int -TEST_Sub(call, a, b, result) - struct rx_call *call; - int a, b; - int *result; +STEST_Sub(struct rx_call *call, int a, int b, int *result) { printf("TEST_Sub(%d,%d)\n", a, b); *result = a - b; return 0; } -Quit(msg, a, b) - char *msg; +static void +Quit(char *msg) { - fprintf(stderr, msg, a, b); + fprintf(stderr, "%s", msg); exit(1); }