After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776467 - [review] ifcfg-rh refactoring line handling in shvar.c [th/ifcfg-shvar-line-bgo776467]
[review] ifcfg-rh refactoring line handling in shvar.c [th/ifcfg-shvar-line-b...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-12-24 12:11 UTC by Thomas Haller
Modified: 2017-01-02 16:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-12-24 12:11:38 UTC
please review
Comment 1 Beniamino Galvani 2017-01-01 21:11:33 UTC
> ifcfg-rh: refactor searching and replacing shvarLine in svhar.c

+  /* if we find multiple entires for the same key, we can

entries


> ifcfg-rh: refactor handling of lines in shvar.c

+line_new_parse (const char *value, gsize len)
 {
 [...]
+       if (   g_ascii_isalpha (value[e])
+           || value[e] != '_') {

This should be "value[e] == '_'" to accept the underscore as first
character in variable name?


> ifcfg-rh: add assertions for handling lines in "shvar.c"

+     *   whitespace prefix, and @key points into @key_with_prefix skiping over the

s/skiping/skipping/


The rest LGTM.
Comment 2 Thomas Haller 2017-01-01 21:25:09 UTC
(In reply to Beniamino Galvani from comment #1)

>  [...]
> +       if (   g_ascii_isalpha (value[e])
> +           || value[e] != '_') {
> 
> This should be "value[e] == '_'" to accept the underscore as first
> character in variable name?

good catch!!



Fixed all and repushed. Thanks!
Comment 3 Beniamino Galvani 2017-01-02 08:04:11 UTC
(In reply to Thomas Haller from comment #2)

> Fixed all and repushed. Thanks!

LGTM.