[systemd-devel] [PATCH] util: Fix signedness error in lines(), match implementations

Lennart Poettering lennart at poettering.net
Sun Jan 4 18:07:42 PST 2015


On Thu, 01.01.15 15:05, Colin Walters (walters at verbum.org) wrote:

> From a74befe02b8a8141a2ffc5613372ef8082a2c6d2 Mon Sep 17 00:00:00 2001
> From: Colin Walters <walters at verbum.org>
> Date: Thu, 1 Jan 2015 14:57:08 -0500
> Subject: [PATCH] util: Fix signedness error in lines(), match implementations
> 
> Regression introduced by ed757c0cb03eef50e8d9aeb4682401c3e9486f0b
> 
> Mirror the implementation of columns(), since the fd_columns()
> functions returns a negative integer for errors.
> 
> Also fix columns() to return the unsigned variable instead of the
> signed intermediary (they're the same, but better to be explicit).

Indeed! This actually fixes a real bug. Applied.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list