reset: trivial style cleanup
[gitweb.git] / builtin / reset.c
index 225e3f141e1d4debc112a2b32fee1b3d3d95fd17..7e65934a82c0212f176bb604c6f22cd5904c7198 100644 (file)
@@ -323,7 +323,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                die_if_unmerged_cache(reset_type);
 
        if (reset_type != SOFT) {
-               struct lock_file *lock = xcalloc(1, sizeof(struct lock_file));
+               struct lock_file *lock = xcalloc(1, sizeof(*lock));
                int newfd = hold_locked_index(lock, 1);
                if (reset_type == MIXED) {
                        int flags = quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN;