UPSTREAM: vsprintf: refactor %pK code out of pointer()
authorTobin C. Harding <me@tobin.cc>
Wed, 22 Nov 2017 23:56:39 +0000 (10:56 +1100)
committerAlistair Strachan <astrachan@google.com>
Fri, 29 Mar 2019 04:16:17 +0000 (21:16 -0700)
commit3a8bb21cd5320b612e88acb866fc0570b044041a
treec83b6e1fc7b7379dca9283ce131cbbd3e3266b29
parent35c32388f7db63540b2a84dfe51a824051371e4b
UPSTREAM: vsprintf: refactor %pK code out of pointer()

Currently code to handle %pK is all within the switch statement in
pointer(). This is the wrong level of abstraction. Each of the other switch
clauses call a helper function, pK should do the same.

Refactor code out of pointer() to new function restricted_pointer().

Signed-off-by: Tobin C. Harding <me@tobin.cc>
(cherry picked from commit 57e734423adda83f3b05505875343284efe3b39c)
Signed-off-by: Sandeep Patil <sspatil@android.com>
Bug: 78533979
Test: Build and boot cuttlefish
Change-Id: Ie78731eb52813a696a33d831b52ae7542ab2a90f
lib/vsprintf.c