diff options
author | 刘建强 <liujianqiang@uniontech.com> | 2021-07-26 09:36:26 +0800 |
---|---|---|
committer | 刘建强 <liujianqiang@uniontech.com> | 2021-07-28 09:40:37 +0800 |
commit | 28174970c74903a856a87542a54c0bef1dacbc86 (patch) | |
tree | 4252670560db36a3f35f90b2b2af7d40c525ef6d /src | |
parent | 420952595b2cdb85f2dcf553162938535393fb09 (diff) | |
download | ostree-28174970c74903a856a87542a54c0bef1dacbc86.tar.gz |
fix: Avoid wild pointers
Pointer command is dangerous if there is no assignment.
Log: Avoid wild pointers
Diffstat (limited to 'src')
-rw-r--r-- | src/ostree/ot-main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index d153dcec..bbaba8b0 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -148,7 +148,6 @@ ostree_run (int argc, OstreeCommand *commands, GError **res_error) { - OstreeCommand *command; GError *error = NULL; GCancellable *cancellable = NULL; #ifndef BUILDOPT_TSAN @@ -187,7 +186,7 @@ ostree_run (int argc, argc = out; - command = commands; + OstreeCommand *command = commands; while (command->name) { if (g_strcmp0 (command_name, command->name) == 0) |