For the file drivers/net/wireless/ti/wl1251/acx.c, the following keeps the comment before the buf update and moves the strlcpy call below it. It does however drop the comment just before the original call to strncpy.
julia @r@ expression dest, src; expression f; @@ - strncpy(dest,src,f); dest[f - 1] = '\0' + + strlcpy(dest,src,f) ; @@ expression r.dest, r.src; expression r.f; @@ - dest[f - 1] = '\0' + strlcpy(dest,src,f); + strlcpy(dest,src,f); _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
