Actions
Bug #574
closedMinor issues in usr/src/cmd/format/startup.c
Status:
Resolved
Priority:
Low
Assignee:
-
Category:
cmd - userland programs
Start date:
2010-12-27
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
format, good-first-bug
Gerrit CR:
External Bug:
Description
This came up during today's meeting: Looking at http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/format/startup.c#2985 ... the code looks a bit inefficient: 1. There are multiple calls of |strlen(DISK_PREFIX)| where |DISK_PREFIX| is a constant string literal 2. The whole |memset(..., 0, ...)| for the buffer used by |readlink()| is an overkill because |readlink()| returns the number of bytes written into the buffer.
Updated by Albert Lee over 11 years ago
- Category set to cmd - userland programs
- Difficulty set to Bite-size
- Tags set to format, good-first-bug
Updated by Albert Lee about 11 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Fixed in:
changeset: 13654:05c013fc7a3f
tag: tip
user: Alek Pinchuk <alek@nexenta.com>
date: Sat Mar 31 16:43:18 2012 -0700
files: usr/src/cmd/format/startup.c
description:
574 Minor issues in usr/src/cmd/format/startup.c
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Albert Lee <trisk@nexenta.com>
Actions