Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Issue 3789046: Do not write empty string to "preload_engines" for safety. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 1 month ago by Yusuke Sato
Modified:
15 years, 1 month ago
Reviewers:
shawn.p.huang, Peng Huang
CC:
satorux
Base URL:
git@github.com:ibus/ibus.git@master
Visibility:
Public.

Description

Do not write empty string to "preload_engines" for safety. Without the change, bus_ibus_impl_set_default_preload_engines() might erase an existing preload_engines config when --timeout option for ibus-daemon is too short for ibus_config_get() to success. BUG=none TEST=manually with 'ibus-daemon --timeout=1'

Patch Set 1 #

Total comments: 2

Patch Set 2 : review fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -2 lines) Patch
M bus/ibusimpl.c View 1 1 chunk +12 lines, -2 lines 0 comments Download

Messages

Total messages: 3
Yusuke Sato
15 years, 1 month ago (2011-01-05 01:40:01 UTC) #1
Peng
LGTM. http://codereview.appspot.com/3789046/diff/1/bus/ibusimpl.c File bus/ibusimpl.c (right): http://codereview.appspot.com/3789046/diff/1/bus/ibusimpl.c#newcode529 bus/ibusimpl.c:529: g_variant_unref (value); You test value != NULL in ...
15 years, 1 month ago (2011-01-05 17:40:04 UTC) #2
Yusuke Sato
15 years, 1 month ago (2011-01-06 03:24:09 UTC) #3
http://codereview.appspot.com/3789046/diff/1/bus/ibusimpl.c
File bus/ibusimpl.c (right):

http://codereview.appspot.com/3789046/diff/1/bus/ibusimpl.c#newcode529
bus/ibusimpl.c:529: g_variant_unref (value);
oops, thanks fixed. submitting.

On 2011/01/05 17:40:04, Shawn.P.Huang wrote:
> You test value != NULL in last if statement.  I think the value may be NULL in
> here too. So I think it is better to use
> 
> if (value != NULL) {
> 
>   if (g_variant_n_children (value) >0) {
>   ...
>   }
>   else {
>   ...
>   }
> 
> }
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b