Skip to content
Snippets Groups Projects
Commit 96b5c89d authored by Andreas Dilger's avatar Andreas Dilger
Browse files

Fix minor compiler warning.

parent 87ccf97a
No related branches found
No related tags found
No related merge requests found
......@@ -13,29 +13,28 @@ int main(int argc, char ** argv)
int i, rc, count;
char filename[4096];
if (argc < 3) {
if (argc < 3) {
printf("Usage %s filenamebase count\n", argv[0]);
return 1;
}
if (strlen(argv[1]) > 4080) {
if (strlen(argv[1]) > 4080) {
printf("name too long\n");
return 1;
}
count = strtoul(argv[2], NULL, 0);
for (i=0 ; i < count ; i++) {
sprintf(filename, "%s-%d", argv[1], i);
for (i=0 ; i < count ; i++) {
sprintf(filename, "%s-%d", argv[1], i);
rc = mknod(filename, S_IFREG| 0444, 0);
if (rc) {
printf("mknod(%s) error: %s\n",
if (rc) {
printf("mknod(%s) error: %s\n",
filename, strerror(errno));
break;
}
if ( (i%10000) == 0 )
printf(" - created %d (time %d)\n", i, time(0));
if ((i % 10000) == 0)
printf(" - created %d (time %ld)\n", i, time(0));
}
return rc;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment