Ticket #415 (closed enhancement: fixed)
trivial optimization in src/file.c::panel_operate()
Reported by: | slavazanko | Owned by: | slavazanko |
---|---|---|---|
Priority: | trivial | Milestone: | 4.7 |
Component: | mc-core | Version: | master |
Keywords: | commited-master | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: |
Description
Message from maillist.
From: Denys Vlasenko (vda).
I noticed an incorrectly indented if() in file.c::panel_operate().
Took a better look, and found out it can be tweaked in several ways.
This patch is the result.
It contains the following trivial optimizations:
- merged two identical "dest_dir_ = g_strdup (dest_dir)" ops.
- simplified check for trailing '/' (no need to strcmp 1-char string).
- since g_free (NULL) is safe, merged two separate "if empty string then bail out" code paths.
- fixed wording in a comment.
Attachments
Change History
comment:1 Changed 16 years ago by slavazanko
- Owner set to slavazanko
- Keywords review vote-slavazanko added
- Status changed from new to accepted
- Type changed from defect to enhancement
created branch 415_trivial_optimization (parent: master)
initial changeset:df256dbaf6521263108958666cda9ac4c3b15608
Review.
Note: See
TracTickets for help on using
tickets.