If someone is familiar with coccinelle it should be possible to replace all uses of: snprintf(buf, sizeof(buf), "%s", foo); with: strlcpy(buf, foo, sizeof(buf)); using semantic patch $ git grep snprintf | grep '"%s"' | grep -v ' = ' | wc -l 114 This could go on the cleanup dpdk-newbies list if there was one.