Skip to contentSkip to conversation

libxl, flexarray_append_pair usage

DISCUSSION Olaf Hering 3 participants 3 messages Apr 24, 2015 – May 1, 2015

lore
Share & tools
lore
#0 lore raw

Review

Quoted 3 lines · Olaf Hering
     flexarray_append(back, "state");
(quoted diff) +1 -1
-    flexarray_append(back, GCSPRINTF("%d", 1));
+    flexarray_append(back, GCSPRINTF("%d", XenbusStateInitialising));

Should all such code be converted to flexarray_append_pair? To reduce line length a short macro should be added, like FLXAP or FLXPAIR or something else.

Olaf

#1 lore raw
Quoted 9 lines · Olaf Hering

Review

Quoted 3 lines · Olaf Hering
     flexarray_append(back, "state");
(quoted diff) +1 -1
-    flexarray_append(back, GCSPRINTF("%d", 1));
+    flexarray_append(back, GCSPRINTF("%d", XenbusStateInitialising));

Should all such code be converted to flexarray_append_pair? To reduce line length a short macro should be added, like FLXAP or FLXPAIR or something else.

I don't have very strong opinion on this.

Wei.

Quoted 2 lines

Olaf

#2 lore raw
In reply to Olaf Hering
Quoted 7 lines · Olaf Hering

Review

Quoted 3 lines · Olaf Hering
     flexarray_append(back, "state");
(quoted diff) +1 -1
-    flexarray_append(back, GCSPRINTF("%d", 1));
+    flexarray_append(back, GCSPRINTF("%d", XenbusStateInitialising));

Should all such code be converted to flexarray_append_pair?

If you are touching the line anyway then I suppose that would be a good thing, although not mandatory.

I don't think it is worth going through and proactively changing things.

Quoted 2 lines

To reduce line length a short macro should be added, like FLXAP or FLXPAIR or something else.

Not sure about this, the macro doesn't save very much and FLX is a bit opaque, I'd be inclined to just do normal wrapping for now.

Ian.