==> Regarding [autofs] [PATCH] More autofs cleanup; "Daniel Richard G." <[EMAIL
PROTECTED]> adds:
skunk> Hello list, Finally built and semi-figured-out git. A few more
skunk> wrinkles ironed out in this patch.
skunk> modules/lookup_hosts.c:
skunk> * Fixed more weirdness of using sprintf()'s return value.
@@ -170,10 +172,10 @@ int lookup_mount(struct autofs_point *ap
*/
if (*name == '/') {
pthread_cleanup_push(cache_lock_cleanup, mc);
- mapent = alloca(strlen(me->mapent) + 1);
- mapent_len = sprintf(mapent, me->mapent);
+ mapent_len = strlen(me->mapent);
+ mapent = alloca(mapent_len + 1);
+ strcpy(mapent, me->mapent);
pthread_cleanup_pop(0);
- mapent[mapent_len] = '\0';
}
done:
cache_unlock(mc);
This is just a refactoring of code with no real gain. The previous usage
was correct.
As Ian mentioned before, posting patches inline makes it easier to quote in
the reply (at least for my arcane mailer. ;).
The rest up to this point looks pretty good to me. Thanks a bunch for
doing this!
-Jeff
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs