You can use find to get the files recursively and then sed to make the changes inline. This should work if I understand your goal correctly:
find . -name 'sed.c' -print0 | xargs -0 sed -i 's/%s/%d/g; s/bcm_errstr(rv)/rv/g;' Note: that this may match more than you want but you have pretty limited target behavior listed. You'll need to adjust the find part to filter for only the files you are targeting.