1.1 --- a/tests/dstest_block_client_simple.cc Sun Aug 01 00:07:00 2021 +0200
1.2 +++ b/tests/dstest_block_client_simple.cc Sun Aug 01 00:23:08 2021 +0200
1.3 @@ -23,6 +23,7 @@
1.4
1.5 #include <stdio.h>
1.6 #include <stdlib.h>
1.7 +#include <string.h>
1.8
1.9 #include <fsclient/client.h>
1.10
1.11 @@ -39,13 +40,14 @@
1.12 /* Obtain filename and access parameters. */
1.13
1.14 char *filename = argv[1];
1.15 - sys_uid_t uid = argc > 2 ? atoi(argv[2]) : 0;
1.16 + bool have_uid = (argc > 2) && strlen(argv[2]);
1.17 + sys_uid_t uid = have_uid ? atoi(argv[2]) : 0;
1.18 int repetition = argc > 3 ? atoi(argv[3]) : 10;
1.19 file_t *file;
1.20
1.21 /* With a user, open a user-specific file opener. */
1.22
1.23 - if (uid)
1.24 + if (have_uid)
1.25 {
1.26 l4_cap_idx_t opener = client_open_for_user((user_t) {uid, uid, 0022});
1.27