diff options
author | Karel Zak | 2012-03-27 15:01:29 +0200 |
---|---|---|
committer | Karel Zak | 2012-03-27 15:01:29 +0200 |
commit | fc5af4b45a7365df1dab406d37aeb3c25a122477 (patch) | |
tree | 9403bf1218e83933d7380cf875fe17f8363b042a /misc-utils/eject.c | |
parent | eject: use xstrdup() (diff) | |
download | kernel-qcow2-util-linux-fc5af4b45a7365df1dab406d37aeb3c25a122477.tar.gz kernel-qcow2-util-linux-fc5af4b45a7365df1dab406d37aeb3c25a122477.tar.xz kernel-qcow2-util-linux-fc5af4b45a7365df1dab406d37aeb3c25a122477.zip |
eject: remove unnecessary variable
Diffstat (limited to 'misc-utils/eject.c')
-rw-r--r-- | misc-utils/eject.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/misc-utils/eject.c b/misc-utils/eject.c index a04eee080..0ec534dd7 100644 --- a/misc-utils/eject.c +++ b/misc-utils/eject.c @@ -639,9 +639,8 @@ void set_device_speed(char *name) /* main program */ -int main(int argc, char **argv) { - - const char *defaultDevice = EJECT_DEFAULT_DEVICE; /* default if no name passed by user */ +int main(int argc, char **argv) +{ int worked = 0; /* set to 1 when successfully ejected */ char *device = 0; /* name passed from user */ char *fullName; /* expanded name */ @@ -666,13 +665,13 @@ int main(int argc, char **argv) { /* handle -d option */ if (d_option) { - printf(_("%s: default device: `%s'\n"), programName, defaultDevice); + printf(_("%s: default device: `%s'\n"), programName, EJECT_DEFAULT_DEVICE); exit(0); } /* if no device, use default */ if (device == 0) { - device = xstrdup(defaultDevice); + device = xstrdup(EJECT_DEFAULT_DEVICE); if (v_option) printf(_("%s: using default device `%s'\n"), programName, device); } |