This is a step used in proving Riesz representation theorem. However I cannot follow his short proof. For every compact set $K$, he construct an $f\in C_{c}(X)$ such that $0\le f\le 1$, and $f(x)=1,x\in K$. This is fine. But then in the end he claim $\int_{X}2fd\mu<\infty$. This means we need to show $\int_{X}fd\mu<\infty$ But why this is true? $f$ can really be any function. So more specific if $X=\mathbb{R}^{*}$, $K=[0,1]$, $x=1$ on $K$ and as $x-2$ outside of $K$, then $f$ is definitely not in $L_{1}(X)$. I think I must be confused with something somewhere.
A proof clearly borrowed from his book can be found at here, page 77, Step 3.